Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: 1 2 3 4 [5]   Go Down

Author Topic: Understanding effects processing  (Read 7638 times)

looper231 and 1 Guest are viewing this topic.

DZ-Jay

  • New User
  • Online Online
  • Posts: 43
  • I [heart] Intellivision.
    • View Profile
    • Carol Vs. Ghost
Re: Understanding effects processing
« Reply #40 on: January 21, 2024, 18:24:22 »

Quick update:  Vibrato is done! (That was quick!  :o)

Attached is a test sample extracted from the emulator.  It uses the following pattern -- a single note played for 32 rows, with a flat sustain instrument envelope, just to let the vibrato play out:
Code: [Select]
00 C-4 -3 F 444 ; Speed: 4; Depth: 1/4
01 --- -- - 400
02 --- -- - 400
03 --- -- - 400
04 --- -- - 400
05 --- -- - 400
06 --- -- - 400
07 --- -- - 400
08 --- -- - 480 ; Speed: 8
09 --- -- - 400
10 --- -- - 400
11 --- -- - 400
12 --- -- - 400
13 --- -- - 400
14 --- -- - 400
15 --- -- - 400

16 --- -- - 408 ; Depth: 1/2
17 --- -- - 400
18 --- -- - 400
19 --- -- - 400
20 --- -- - 400
21 --- -- - 400
22 --- -- - 400
23 --- -- - 400
24 --- -- - 40F ; Depth: full
25 --- -- - 400
26 --- -- - 400
27 --- -- - 400
28 --- -- - 400
29 --- -- - 400
30 --- -- - 400
31 --- -- - 400

I've adapted the effect to conform to the platform capabilities.  It simulates an LFO with a sine waveform plotted over 64 points, with a maximum amplitude of +/- 2 semitones:
Code: [Select]
      0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
30 0F :.............#####.............:...............:...............
29 0E :...........##..:..##...........:...............:...............
28 0D :..........#....:....#..........:...............:...............
27 0C :........##.....:.....##........:...............:...............
26 0B :.......#.......:.......#.......:...............:...............
25 0A :......#........:........#......:...............:...............
24 09 :...............:...............:...............:...............
23 08 :.....#.........:.........#.....:...............:...............
22 07 :....#..........:..........#....:...............:...............
21 06 :...#...........:...........#...:...............:...............
20 05 :...............:...............:...............:...............
19 04 :..#............:............#..:...............:...............
18 03 :.#.............:.............#.:...............:...............
17 02 :...............:...............:...............:...............
16 01 :#..............:..............#:...............:...............
15 00 #---------------+---------------#-------------------------------
14 01 :...............:...............:#..............:..............#
13 02 :...............:...............:...............:...............
12 03 :...............:...............:.#.............:.............#.
11 04 :...............:...............:..#............:............#..
10 05 :...............:...............:...............:...............
09 06 :...............:...............:...#...........:...........#...
08 07 :...............:...............:....#..........:..........#....
07 08 :...............:...............:.....#.........:.........#.....
06 09 :...............:...............:...............:...............
05 0A :...............:...............:......#........:........#......
04 0B :...............:...............:.......#.......:.......#.......
03 0C :...............:...............:........##.....:.....##........
02 0D :...............:...............:..........#....:....#..........
01 0E :...............:...............:...........##..:..##...........
00 0F :...............:...............:.............#####.............

The speed parameter is obviously how many points in the graph to advance on each tick, and the depth parameter scales the amplitude at each point in 1/16th increments.  So, a depth of $4 will be 4/16th of the amplitude at the current point in the graph, and a depth of $F will be 16/16th, or the full amplitude.

The only thing I am not really sure about is the maximum amplitude of the LFO.  I have it right now to be the distance between the previous and the next semitone of the active note -- or +/- 2 semitones.  I think this is how it should be.

Any feedback is appreciated! :)

     -dZ.
Logged
P. Machinery:
   Another hope feeds another dream...
   Another truth installed by the machine.

   -- Propaganda

DZ-Jay

  • New User
  • Online Online
  • Posts: 43
  • I [heart] Intellivision.
    • View Profile
    • Carol Vs. Ghost
Re: Understanding effects processing
« Reply #41 on: March 17, 2024, 17:23:16 »

Progress, you ask?  Why, yes.  We have some.  :)

I fixed a bug* in which "tick-zero of a row" was confused with "first tick of a note," which caused the tick-zero handling to only be executed when a new note is started.  DOH!

(* The "bug" existed in my head as well, since I wrote the code to work that way because that is how I understood it.  Imagine my shock and surprise when I finally figured out that it was all wrong.)

We now have the following effects supported:
  • 0xy: Arpeggio
  • 1xx: Portamento Up
  • 2xx: Portamento Down
  • 3xx: Portamento To Note
  • 4xy: Vibrato
  • 5xy: Portamento To Note + Volume Slide
  • 6xy: Vibrato + Volume Slide
  • 7xy: Tremolo
  • Axy: Volume Slide
  • E1y: Fine Portamento Up
  • E2y: Fine Portamento Down
  • EAy: Fine Volume Slide Up
  • EBy: Fine Volume Slide Down
  • Gxx: Set Global Volume

That's a pretty nice roster.

All these effects have been tested and work as expected -- well, at least the way I understood them to work, based on my research, reference documents, and the feedback from this forum.

I'm quite happy with the results.  I feel now that I have a rather solid framework that handles ticks and effects correctly, so adding new effects should go smoother in the future -- I mean, what could possibly go wrong?  ;D  (Said the guy that has had to re-write his tracker engine multiple times to fix design flaws ...)

Anyway, my next step is to implement a few more of the low-hanging fruit effects, such as  Set Song Speed (Fxx), Tremor (Txx), etc., and see how it goes.

Stay tuned! (Har! Har! see what I did there?)

     -dZ.


UPDATE: Added Gxx effect.
« Last Edit: March 17, 2024, 18:09:16 by DZ-Jay »
Logged
P. Machinery:
   Another hope feeds another dream...
   Another truth installed by the machine.

   -- Propaganda

looper231

  • Newbie
  • Online Online
  • Posts: 59
  • Casual guy
    • View Profile
    • My site
Re: Understanding effects processing
« Reply #42 on: March 18, 2024, 02:10:59 »

Keep up the development  ;)
Logged
"Beyond the reach of human range. A bit of evil. A touch of strange" - Paradox

DZ-Jay

  • New User
  • Online Online
  • Posts: 43
  • I [heart] Intellivision.
    • View Profile
    • Carol Vs. Ghost
Re: Understanding effects processing
« Reply #43 on: April 06, 2024, 14:28:07 »

Another week, another progress report.

After going off on a tangent foolishly attempting to optimize effects processing, I hit a rather nasty brick wall.  I ended up reverting most of those changes and going back to the way I had it working.

Plus ça change ...

Anyway, I added a few more effects:  The tracker now has dynamic song speed (Fxx) and pattern delay (EEx), among other new tricks.

Below is the latest list of effects and their status:
Code: [Select]
--------------------------------                ------
Standard Effects                                Status
--------------------------------                ------
$00: 0   Arpeggio                               Done
$01: 1   Portamento Up                          Done
$02: 2   Portamento Down                        Done
$03: 3   Portamento To Note                     Done
$04: 4   Vibrato                                Done
$05: 5   Portamento To Note + Volume Slide      Done
$06: 6   Vibrato + Volume Slide                 Done
$07: 7   Tremolo                                Done
$08: 8   ---                                   
$09: 9   ---                                   
$0A: A   Volume Slide                           Done
$0B: B   Jump To Order                         
$0C: C   Set Note Volume                       
$0D: D   Pattern Break                         
$0E: E   E Sub-Commands (Dispatcher)            Done
$0F: F   Set Song Speed                         Done
$10: G   Set Global Volume                      Done (Controls volume attenuation only.)
$11: H   Global Volume Slide                    Done (Controls volume attenuation only.)
$12: I   ---                                   
$13: J   ---                                   
$14: K   ---                                   
$15: L   Set Envelope Position                 
$16: M   ---                                   
$17: N   ---                                   
$18: O   ---                                   
$19: P   ---                                   
$1A: Q   ---                                   
$1B: R   Re-trigger Note + Volume Slide         
$1C: S   ---                                   
$1D: T   Tremor                                 
$1E: U   ---                                   
$1F: V   ---                                   
$20: W   ---                                   
$21: X   X Sub-Commands                         
$22: Y   ---                                   
$23: Z   ---                                   
                                               
--------------------------------                ------
Standard Effects                                Status
--------------------------------                ------
$00: E0  ---                                   
$01: E1  Fine Portamento Up                     Done
$02: E2  Fine Portamento Down                   Done
$03: E3  ---                                   
$04: E4  Set Vibrato Waveform                   
$05: E5  ---                                   
$06: E6  Pattern Loop                           
$07: E7  Set Tremolo Waveform                   
$08: E8  ---                                   
$09: E9  Re-trigger Note                       
$0A: EA  Fine Volume Slide Up                   Done
$0B: EB  Fine Volume Slide Down                 Done
$0C: EC  Note Cut                               
$0D: ED  Note Delay                             
$0E: EE  Pattern Delay                          Done
$0F: EF  ---                                   
                                               
--------------------------------                ------
"X" Extended Sub-Command Effects               
--------------------------------                ------
$00: X0  ---                                   
$01: X1  Extra Fine Portamento Up               
$02: X2  Extra Fine Portamento Down             

Aiming for Note Delay (EDx) next and a few of the other "global" control commands like Pattern Loop (E6x), Pattern Break (Dxx), Jump To Order (Bxx), etc.

Here's hoping for a smooth ride!

   -dZ.


P.S. One of these days I will have to start tracking a song for real to make sure it all works ... Someday ...
Logged
P. Machinery:
   Another hope feeds another dream...
   Another truth installed by the machine.

   -- Propaganda

DZ-Jay

  • New User
  • Online Online
  • Posts: 43
  • I [heart] Intellivision.
    • View Profile
    • Carol Vs. Ghost
Re: Understanding effects processing
« Reply #44 on: Today at 17:39:02 »

It's been slow but steady, and I have some progress to report.

The note delay (EDx) turned out to be more difficult than expected, mostly because of the resource constraints of the platform.

After much toil and many false starts, eventually I gave up on continuing to process the previous note during the delay, and decided to just not update the channel until the delay concludes.  This means that the channel state is left as is -- with whatever tone and volume it had at the moment the new note is read -- while the delay counts down to zero, at which point we trigger the new note.

It's not ideal, but serviceable, and saves me a lot of headache in having to make the tracker keep the new note event details in memory, while retaining the old one's as well and process it as if it were still active.  (I have up to 6 channels to support, and a full duplicate of the buffer for each of them is quite a big chunk of the memory available on the Intellivision.)

Anyway, it seems to work well in practice, to some extent.

The full roster of available effects on the Intellivision Music Tracker so far are:
Code: [Select]
--------------------------------                ------
Standard Effects                                Status
--------------------------------                ------
$00: 0   Arpeggio                               Done
$01: 1   Portamento Up                          Done
$02: 2   Portamento Down                        Done
$03: 3   Portamento To Note                     Done
$04: 4   Vibrato                                Done
$05: 5   Portamento To Note + Volume Slide      Done
$06: 6   Vibrato + Volume Slide                 Done
$07: 7   Tremolo                                Done
$08: 8   ---
$09: 9   ---
$0A: A   Volume Slide                           Done
$0B: B   Jump To Order
$0C: C   Set Note Volume
$0D: D   Pattern Break
$0E: E   E Sub-Commands (Dispatcher)            Done
$0F: F   Set Song Speed                         Done
$10: G   Set Global Volume                      Done (Controls volume attenuation only.)
$11: H   Global Volume Slide                    Done (Controls volume attenuation only.)
$12: I   ---
$13: J   ---
$14: K   ---
$15: L   Set Envelope Position
$16: M   ---
$17: N   ---
$18: O   ---
$19: P   ---
$1A: Q   ---
$1B: R   Re-trigger Note + Volume Slide
$1C: S   ---
$1D: T   Tremor
$1E: U   ---
$1F: V   ---
$20: W   ---
$21: X   X Sub-Commands
$22: Y   ---
$23: Z   ---

--------------------------------                ------
Standard Effects                                Status
--------------------------------                ------
$00: E0  ---
$01: E1  Fine Portamento Up                     Done
$02: E2  Fine Portamento Down                   Done
$03: E3  ---
$04: E4  Set Vibrato Waveform
$05: E5  ---
$06: E6  Pattern Loop
$07: E7  Set Tremolo Waveform
$08: E8  ---
$09: E9  Re-trigger Note
$0A: EA  Fine Volume Slide Up                   Done
$0B: EB  Fine Volume Slide Down                 Done
$0C: EC  Note Cut
$0D: ED  Note Delay                             Done
$0E: EE  Pattern Delay                          Done
$0F: EF  ---

--------------------------------                ------
"X" Extended Sub-Command Effects
--------------------------------                ------
$00: X0  ---
$01: X1  Extra Fine Portamento Up               Done
$02: X2  Extra Fine Portamento Down             Done

I think I'll take a break from the tracker player and actually do some tracking.  It's time to test this baby and make sure it works as expected. :)

      -dZ.
« Last Edit: Today at 19:48:01 by DZ-Jay »
Logged
P. Machinery:
   Another hope feeds another dream...
   Another truth installed by the machine.

   -- Propaganda

looper231

  • Newbie
  • Online Online
  • Posts: 59
  • Casual guy
    • View Profile
    • My site
Re: Understanding effects processing
« Reply #45 on: Today at 19:45:44 »

God bless. I'm looking forward to your works!
Happy to see you making progress!
Logged
"Beyond the reach of human range. A bit of evil. A touch of strange" - Paradox
Pages: 1 2 3 4 [5]   Go Up