113

(438 replies, posted in Commodore Computers)

Amelinium wrote:

it will fuck up the envelopes without $09 testbit hardrestart each time you retrigger it without closing the gate.

The testbit has nothing to do with ADSR envelopes and gate on/off. What the testbit does is to reset the oscillator that produces the waveform, and that is completely independent of the volume envelope generation (ADSR + gate) in the SID hardware.

Anyway, I can see the point in some automation like the one you're thinking of, and of course I've thought about it too, but it won't happen because:

There are a lot of things that would be nice to have and that would make a lot of sense — individually — but starting to implement them, one by one, will gradually make defMON slower, more bloated, probably more prone to bugs due to increased complexity, and so forth. The limit has to be drawn somewhere, and I've chosen to draw it pretty narrowly around what's really important to have. Think of it as a design decision.

A change like this would also break the file format of defMON tunes, and this would cause some trouble for various secret tools that are around.

114

(438 replies, posted in Commodore Computers)

There are in fact a number of complications associated with doing hardrestart without using a -1 position (unless you have the kind of look-ahead code that other editors have, but that I wanted to avoid for the reasons that I mentioned). Some of these complications relate to mixing sounds with different kinds of hardrestart or no hard restart, and some of them relate to synching defMON to external synths.

Anyway, none of this really matters too much because: note that you can actually use the -1 step as a step 0. That is, you can indeed put your first note on that -1 step. It is actually just a way of presenting things graphically that makes you think the "-1" step is a -1 step in the first place. You could just as well treat it as step 0 and do hardrestart the way you want to (e.g. to make the actual start of the audible sound a bit delayed compared to the position in the sequence where you put the sidtab value, if I understand you correctly.) When you press F1 or F3 to play your tune, the -1 step will be played first, so in that sense this step is actually just like any other "first step in a sequence". It is just that line numbers will seem odd in that case of course, but at least the choice is there.

Shortcut to get to the -1 step in a sequence: Press CTRL+G twice. First time will take you to step 0. Second time will take you to step -1.

115

(438 replies, posted in Commodore Computers)

About the "-1" step: That is because defMON is designed to implement as little "built in" functions as possible. Things like hardrestart, vibrato, etc.. Instead it is up to the user to do it themselves in the sidtab. That comes at a cost of course (less automation), but the benefit is increased flexibility. You can do any kind of hardrestart in defMON, whereas most other editors only feature one type of built in hardrestart and no reasonable way to do it manually (especially not at that first step in the sequence).

Also, implementing hardrestart without that "prior first step" in sequences requires that the sequence parsing code looks ahead: e.g. that it parses sequences before it is actually time to parse them, to see if a hardrestart sound is coming up, because the hardrestart has to be trigged 2-3 frames (depending on what sort of hardrestart you do) before the actual start of the audible sound. Such look ahead-parsing adds overhead to the code and consumes CPU that isn't strictly required. Original defMON was intended to be usable in demos/games, with low raster time consumption.

if defMON II becomes reality at some point, it will ditch the idea of its tunes being usable in demos/games, and rather go for usability and allow the program to use all the CPU power there is. If that happens, the weird "-1" step won't be there, and things will rather look like the rest of the trackers in this world do.

Have a look here for a BPM calculator, which may make manual syncinc easier:
http://toolsforscholars.com/defmon/bpm.html

There are no plans for adding the flashing thing again.

116

(438 replies, posted in Commodore Computers)

Okay.. so all of them get the same size. Also good to know. Seems that the worktune packing sometimes fails then. Good thing that the unpacking of those tunes work at least, when you load them again. big_smile How often, roughly, would you say this happens?

Then again, maybe I shouldn't think too much about this until you switch to a new version and still keep reporting this issue. smile

117

(438 replies, posted in Commodore Computers)

Thanks for reporting! Yes, this is the right place. Actually the same thing happened to me as well for the first time only a few days ago. Haven't seen it before, or actually even heard about it from others either. Will keep an eye out for that. Any clues of under what circumstances this may happen are of course very welcome. Anyway, since it happened to me for the first time only recently, I kind of guessed that this may be some new bug introduced in recent versions, but maybe it is actually an old bug then. Good to know!

On the whole I can't recommend the G*P version since a bunch of bugs have been fixed since then, but I guess you know that already.

Trick to apply speed settings globally:

1. CTRL+Z CTRL+A to select "ZONE ALL" = edit all sequences at the same time (warning! This mode of editing is obviously potentially very destructive in case you happen to change something else as well. The border color will change to indicate that you're in a different mode than the normal one.)

2. Then type in the speed pattern you want

3. CTRL+RETURN to get out of this mode and edit normally again. (The border color will go back to normal.)

Then again, doing it the way you do isn't necessarily a bad solution either. I also do that a lot.

Alright! big_smile I'll think about it just a bit more, like until tomorrow or something, and then send you and e-mail.

On my wish list would be full MIDI out, and also full MIDI in... wink ...but that would be more than a mere revision of "the same thing" of course. Just saying. smile

I like how you make experimental things. Most respectable. Keep it up!

121

(438 replies, posted in Commodore Computers)

ADSR in brief:

Attack
$0 is quickest and $f is slowest = the time it takes for the volume to rise from zero to max. The Attack phase starts whenever the GATE bit is turned on (more info on the GATE bit below).

Decay
$0 is quickest and $f is slowest = the time it takes for the volume to fall from max and down to the Sustain level (see below). The Decay phase starts automatically as soon as the Attack phase has finished.

Sustain
$0 is silence and $if is the loudest = the VOLUME (not the time) that the ADSR envelope stops at after having gone through the Attack and the Decay phase. As long as the GATE bit is still on, the ADSR envelope will stay in the Sustain phase forever. When GATE is turned off, the Sustain phase ends and the Release phase (see below) starts instead.

Release
$0 is quickest and $f is slowest = the time it takes for the volume to fall from the Sustain level and down to zero volume. More accurately, the Release phase may be started even before the ADSR envelope has reached the Sustain phase. For example, if you have a really slow Attack, and turn gate off before the Attack is done, the Release will start falling from whatever volume the ADSR is at, rather than from the specified Sustain level.

The GATE bit, that triggers the ADSR, is found in the WG columns on the sidtab screen in defMON. Normal usage of the WG columns would be to only use the upper nibble (e.g. the X in $XY) in the first WG column to set waveforms, and to only use the lower nibble (e.g. the Y in $XY)  in the second WG column.

So to set triangle waveform (the $10 in the first WG column), and the gate bit to ON (the $01 in the second WG column), and ADSR to $11fa, you execute a line that looks like this:

WG WG AD SR
10 01 11 fa

...and then some time later you would execute a line where there is a 00 in the second WG column to turn the GATE bit off again, which will then have the effect that the ADSR envelope stops hovering at the Sustain level and instead enters the Release phase. Like this:

WG WG AD SR
.. 00 .. ..

(This is also why there are two WG columns, because it allows the waveform to be "remembered" (in the first WG column) even if you turn the gate bit off in the second WG column.)

This explanation is quite technical, but hopefully it helps in some way at least. In those instruction videos that I'll do, I'll make sure to visualize the ADSR stuff graphically, to make it easier to grasp.

122

(438 replies, posted in Commodore Computers)

The reference I tend to use, not just for SID but for C64 in general, is this one:
http://unusedino.de/ec64/technical/aay/c64/sidmain.htm

It doesn't explain much though as it is mainly just a summary of the registers. Not sure if that is what you're interested in. Otherwise some of the chapters on SID in books like "Mapping the 64" and "Programmers Reference Guide" may be worth a look:
https://codebase64.org/doku.php?id=books:start
http://project64.c64.org/hw/c64.html

123

(438 replies, posted in Commodore Computers)

Nice! I'll do my videos in any case, but more is always better for these things. Actually I did some preparations for this yesterday, so I think I'm rolling now, so to speak.

124

(438 replies, posted in Commodore Computers)

Yep. Currently looking into different solutions. One thing that makes defMON different from most other videos that explain how to use software is that you use a keyboard a lot, whereas those other videos are very much based on moving the mouse arrow arround etc. ...but I'll figure something out.

125

(438 replies, posted in Commodore Computers)

For quite a while I've been thinking about making a series of instruction videos on youtube or something, possibly even two: One about how the SID works in general, and one about how to use defMON. Main obstacle is actually that I don't have a video camera.

126

(438 replies, posted in Commodore Computers)

Ha!

http://toolsforscholars.com/defmon/doku … s_overseas

127

(438 replies, posted in Commodore Computers)

The finetune/slide stuff is actually just a continuation of the frequency table so all you would have to do is to calculate some more data. Except the twelve bytes following the _player_notes_lo_slide label are just some sort of manually typed in interpolation between 0 and $11 (e.g. the first byte following the _player_notes_lo_finetune label). Only every second byte are used on that row, so that's why there are pairs of identical values on that row. If you don't use slow slides (less than $86 in the sid table or so), you don't need to bother about those 12 bytes of slide stuff.

So, what you have to do is bascially to calculate 12 octaves of NTSC frequency data, and put the lobytes in one table, the hibytes in another (I'm pretty sure it is the same in GT, except for maybe a different number of octaves required), and then make that manual interpolation between 0 and X for the slide values if desired.

128

(438 replies, posted in Commodore Computers)

Sure you can edit the frequency tables. Low bytes of freq table start at 0x159c in RAM, and high bytes start at 0x1638 in my latest development version. The particular RAM location may vary a little between versions though, so if this doesn't seem to work, you can search for this string of bytes to find the lobyte table:

    !byte $46,$4a,$4e,$53,$58,$5d,$62,$68,$6e,$75,$7c,$83

...and this string of bytes to find the hibyte table:

    !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01
    !byte $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$02
    !byte $02,$02,$02,$02,$02,$02,$03,$03,$03,$03,$03,$04
    !byte $04,$04,$04,$05,$05,$05,$06,$06,$06,$07,$07,$08

Actually, it is a little more intricate than that, since these tables are preceded by some other bytes that are used for frequency slide functions as well, so the real frequency table in defMON looks like this in the source code:

_player_notes_lo_slide:
    !byte $00,$00,$01,$01,$02,$02,$04,$04,$08,$08,$0c,$0c ;To allow very slow slides too..
_player_notes_lo_finetune:
    !byte $11,$12,$14,$15,$16,$17,$19,$1a,$1c,$1d,$1f,$21
    !byte $23,$25,$27,$29,$2c,$2e,$31,$34,$37,$3b,$3e,$42
_player_notes_lo:
    !byte $46,$4a,$4e,$53,$58,$5d,$62,$68,$6e,$75,$7c,$83
    !byte $8b,$93,$9c,$a6,$af,$ba,$c5,$d1,$dd,$ea,$f8,$07
    !byte $16,$27,$39,$4b,$5f,$74,$8a,$a1,$ba,$d4,$f0,$0e
    !byte $2d,$4e,$71,$96,$be,$e7,$14,$42,$74,$a9,$e0,$1b
    !byte $5a,$9c,$e2,$2d,$7b,$cf,$27,$85,$e8,$51,$c1,$37
    !byte $b4,$38,$c4,$59,$f7,$9d,$4e,$0a,$d0,$a2,$81,$6d
    !byte $67,$70,$89,$b2,$ed,$3b,$9c,$13,$a0,$45,$02,$da
    !byte $ce,$e0,$11,$64,$da,$76,$39,$26,$40,$89,$04,$b4
    !byte $9c,$c0,$23,$c8,$b4,$eb,$72,$4c,$80,$12,$08,$68
    !byte $39,$80,$45,$90,$68,$d6,$e3,$99,$00,$24,$10,$ff

_player_notes_hi_slide:
    !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00  ;To allow very slow slides too..
_player_notes_hi_finetune:
    !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
_player_notes_hi:
    !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01
    !byte $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$02
    !byte $02,$02,$02,$02,$02,$02,$03,$03,$03,$03,$03,$04
    !byte $04,$04,$04,$05,$05,$05,$06,$06,$06,$07,$07,$08
    !byte $08,$09,$09,$0a,$0a,$0b,$0c,$0d,$0d,$0e,$0f,$10
    !byte $11,$12,$13,$14,$15,$17,$18,$1a,$1b,$1d,$1f,$20
    !byte $22,$24,$27,$29,$2b,$2e,$31,$34,$37,$3a,$3e,$41
    !byte $45,$49,$4e,$52,$57,$5c,$62,$68,$6e,$75,$7c,$83
    !byte $8b,$93,$9c,$a5,$af,$b9,$c4,$d0,$dd,$ea,$f8,$ff

Anyway, if editing the table seems to work in general on an NTSC machine I might add a specific NTSC version in the next release of defMON. I won't make promises as for when that might happen though.