ant1 wrote:

Judging by this post, Neil is already doing/has already done that. smile

Yup smile

PixyJunket wrote:

Dude, you are a monster.

(and have great taste in TV shows).

There's a story behind that that I may share with you all if I get 5 minutes smile

Scratch that, I've just made it better.

Now, you just specify the Speed Table index, $00-$1F. Then in the table itself, if the speed setting is lower than $20, its treated as a frame counter, otherwise it's used in a overflow calculation. So;

00:03 00        ;set frame counter sped 3, loop

or

00:50 00        ;set overflow counter to $50, loop

Perfect! big_smile

@akira Yep, exactly the same.

Yeah, you want that stuff in a table. Frees up the effect column then smile

Oh, I'm also going to have a command in the Song Master Track too, you'll then have the flexibility of setting the speed table index either in a Pattern on in the Song.

I'm too good to you all wink

DAMN YOU O'HARE!

Actually I've just put both in and it works fine. Needs a bit more thinking about though as currently;

$00-$1F = index into pitch table using frame counter, $00-$1F
$80-$9F = index into pitch table using overflow method, $00-$1F

which is not the most obvious thing in the world but it does work.

I forgot to say that you can get some "extra" resolution from the frame counter method by specifying a loop between two values in the speed table;

00:03 01        ;speed 3, jump to step 1
01:04 00        ;speed 4, jump to step 0

which would be slightly slower than speed 3 but slightly faster than speed 4, and so on.

Plus you can do the "swing feel" trick using the same method;

00:02 01
01:02 02
02:04 00

etc.

arfink wrote:

Nice, thanks Neil. OK then, I'll design my cart with extra PRG ROM space and I can just pad it out for now. And, just so you know, I was going to spend money on some MMC1 dev carts anyways, so what the heck, right? I think that since you're shooting for more than 128kbit of PRG space sometime down the line I'll just plan on modding an SNROM cart and just dealing with the WRAM to CHR ROM conversion anyway, since an SKROM can't do bigger than 128kbit PRG ROM.

Of course, you could just get really crazy and change the mapper entirely... which I wouldn't mind. Do what you need to do. I only asked because I happen to have an MMC1 in the works here, and wanted to make sure I could accommodate your code as long as I'm at it.

Cool.

I chose MMC1 because it seemed the simplest and most common mapper. If going over 128k is awkward then I'll try to mitigate my ROM space issues.

Actually, gentlemen, I could do with some input.

While on the subject of speed tables, I have a quandary. As far as I know there are only two methods of doing "tempo" on a fixed refresh rate system (i.e. NTSC being 60fps, constantly).

Method one is using a frame counter. So your "tempo" is the number of frames in between each tick.

Method two utilises arithmetic overflow. You keep adding the "tempo" setting to an internal counter. When the resulting number exceeds 256 (8 bits), the carry flag is set. This is when you do your next tick.

Method one offers the most stable timing as it's always based on a factor of 60fps e.g. a "tempo" of 3 would have a delay of 180 frames between each tick. However, this means that you have little in the way of tempo resolution as the smallest difference between one tempo and the next is 60 frames.

Method two offers you more resolution (I won't get into why) but is less stable because, depending on the speed, every X ticks, it will miss an update. This shows up as tiny fluctuations in your song tempo.

So the question is, which one to use for NTRQ? You've all probably more experience of trackers than me so I'd value any input.

Dare I say I've thought of a way of maybe having both. Maybe... but forget I said that for the time being smile

(Oh, alternatively, if any of you are programming-minded, is there a better way of doing method 2? I've heard some people doing the same thing but with a 16-bit counter instead but I can't see how this would improve the stability?)

@arfink

Yes, that's the current configuration.

I don't envisage it changing and if it does it will most likely be an increase in PRG ROM size (another bank maybe).

Please just bear that in mind before spending money on carts etc.

Until I have the core features locked I can't consolidate/optimise ROM layout etc plus I'd want some ROM overhead for future expansion.

Shit, dudes, this is getting exciting! big_smile

Extra effort on my part to get back on track after my little redesign. It's progressing OK at the moment, adding a new editor mode always takes a while.

I've also come up with yet another editing mode which will make things even better. Can't decide whether to do that now while I'm in that frame of mind or put it at the bottom of the list. LOL

I'm so glad I did the redesign to fit in the Song "Master Track". Having the ability to use repeat/jump commands has meant there's not so much pressure on maxing out the space for patterns.

It's currently on MMC1. Here's my iNES header from the source code;

; iNES header

; iNES identifier
.byte "NES",$1a 

; Number of PRG-ROM blocks
.byte $04

; Number of CHR-ROM blocks
.byte $02

; ROM control bytes: Horizontal mirroring, SRAM
; No trainer, Mapper #0
;.byte $00, $00
.byte %00010010, %00000000            ;MMC1 with SRAM

; Filler
.byte $00,$00,$00,$00,$00,$00,$00,$00    

This always happens. As I was typing that big post a genius idea popped into my head regarding the Song Editor. I've always wanted to get a speed table into NTRQ (it actually has one internally) but I had totally no screen space for it.

On Sunday I thought about the layout of the Song Editor and how it was a bit wasteful to always display the Transpose setting for each pattern (that's the "40" you can see in the columns of the song). And then the solution came to me.

To edit values in the Song Editor, most of the time you're using the (A) button, holding it down to modify the numbers with U/D/L/R. (B) was being under-used so my solution is to normally display just the Pattern numbers but if you hold (B), the Song "flips" and shows you all the Transpose values so you can edit one. Let go of (B) and the song display snaps back to showing  Pattern numbers again.

Multiple benefits:

- the width of the Song Editor is halved so I can now have the speed table displayed and editable
- I now have the space for an extra column in the Song which will be used for "master track" type stuff e.g. repeating song steps, setting tempo, setting volume, fading volume
- smaller Song Editor = faster screen updates
- it actually looks better, more symetrical

I had to really break the code to make it work but it's up and running again now (though I have generated quite a list of stuff to fix/check). Here's what it looks like (click the link underneath for full-size);


NTRQ Layout 5

ant1 wrote:
neilbaldwin wrote:

I would love to but I (currently) wouldn't know where to even start.

A mad idea I was thinking of (and I don't even know if such a thing exists or is possible) would be an optical CV-to-MIDI gadget that you could point at a particular area of the screen and I would flash a small white square on screen in time with the refresh rate of the song. Then these pulses could be turned into MIDI clock (with some smoothing) and so NTRQ would be MIDI master clock to your slave devices.

That's probably insane I know big_smile

I've controlled a child's toy by taping a whole load of LDRs to a plastic tray, and hanging this from the screen of my laptop (modplug tracker --> MIDI out --> pure data --> screen) . I know little-scale once did something similar, but I don't really remember any of the details. It's not such an implausible idea, and possibly one of the easiest and cheapest ways of midi sync to implement. smile

BOOM! That's what I'm fucking talking about right there!

That's cheered me up on a dreary (the weather) weary (I've decided NTRQ Song Editor needs a redesign) Sunday smile

KeFF wrote:

midisync would be heart

I would love to but I (currently) wouldn't know where to even start.

A mad idea I was thinking of (and I don't even know if such a thing exists or is possible) would be an optical CV-to-MIDI gadget that you could point at a particular area of the screen and I would flash a small white square on screen in time with the refresh rate of the song. Then these pulses could be turned into MIDI clock (with some smoothing) and so NTRQ would be MIDI master clock to your slave devices.

That's probably insane I know big_smile

Phew! I finally made it here. I registered a few days ago but today I found out that the spam folder in my mail client != spam folder in my website control panel. Damned modern technology. And I still have the flu. OK, enough excuses... smile

If you've any questions/suggestions, fire away!

By way of a starter, here's what I still need to do on NTRQ before I consider it fit for release (taken from my dev log so might not make much sense);

+ Fix bug with insert/delete in Pitch & Duty Tables where indexes get wrongly updated
+ Get to the bottom of hardware sweep instability (it's a bit "wild" at the moment)
+ Vibrato rewrite using sine table
+ Make notes on Triangle channel display an octave below others (as that's how they sound)
+ Add simple Delay command to Pitch Table
+ Add "Wait For Release" command to Pitch Table
+ Pitch Slide still needs more work. Slides in lower octaves not really fast enough at maximum speed
+ Muting needs to kill DPCM immediately
+ Add Sample Offset to DPCM commands
+ Implement remaining play modes (play from marker, loop single song step etc.)

Bug count is currently not *too* bad. Major thing is the odd occasion I get a bit of screen corruption. I think I'm just trying to write too much to the screen in places and when it spikes (say if you have a pattern with a note/command on every step), it messes up a few CHRs and only a power cycle can restore it.

-----------------------------------------------------------------

Just picking up on a couple of things from the thread here;

1) Is NTRQ a great leap forward for NES music? Probably not. Computer-based trackers are always going to be (able to be) faster and more fluid to use (well, some of them anyway) and you certainly don't face the same limitations that I have when making NTRQ. I think NTRQ started out as something to prove but it's actually turned into a very, very usable and fun tool. The videos I put up don't really do it justice and I'm the most modest person you'll meet. smile

2) Yes, I'm currently developing on Netopia but I also have a Famicom(AV) and PowerPak cart that I test on every couple of days. I've not tested any other emulators much but I have ran it on Nintendulator and nothing obvious reared up.

3) Composition Vs Live: I thought about this a lot and tried to make it somewhere in between the two. It's honestly easier to compose in than you might imagine. The Achilles Heel is obviously no keyboard-style input. I just use NLog (software synth) on my iPhone to work tunes out smile Hopefully I can get some Famicom keyboard support in (when I actually get my hands on one). The Billie Jean tune took me hardly any time at all to knock up and that's before I have the extra play features such as "Loop Single Song Step" which will aid composition (so you can repeat the same section and tweak it until it's right). It does lend itself to live play though, very much. To enhance this I'm going to put in a "Live Jam" mode where you'll be able to "take over" one of the channels and play it with the joypad. That's a little way off though.

4) DPCM. This is the least-developed area of NTRQ at the moment but I've been experimenting and have a few ideas to implement. I'm going to give you enough tools to be able to build your own bank of samples but I also want to compile a useful default sample set for people that don't want to build ROMs. Ideas very welcome!

5) I need some breakfast.

Neil