Jump to content

Photo

PWMish sound in a tracker

pokey tracker TMC raster

63 replies to this topic

#1 makary OFFLINE  

makary

    Star Raider

  • 88 posts

Posted Sun Nov 18, 2018 4:10 AM

I've tried to get a sort of PWM sound in a tracker. And I don't mean an accidental effect, but something more or less stable and predictable. The idea is a development of Raster's idea from his 'Delta' cover and 'C64 synth' instrument. Here is a mediocre example, but I hope you can hear and see what is going on the first channel. XEX included as well.

 

Attached Files


Edited by makary, Sun Nov 18, 2018 4:12 AM.


#2 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 11,163 posts
  • Location:Baden-Württemberg, Germany

Posted Sun Nov 18, 2018 4:17 AM

Great. Love that buzz sound... good old TMC.... underrated imho.

#3 Rybags OFFLINE  

Rybags

    Gridrunner

  • 15,996 posts
  • Location:Australia

Posted Sun Nov 18, 2018 4:43 AM

Yeah good stuff.  And it's such an unexplored area - a lot of existing stuff is using filters, high frequency or other tricks yet there's 2-tone still waiting.  And low frequency digital/forced volume could accomplish a lot as well and cheaply.  A 200 Hz variable pulse wave costs next to nothing in terms of CPU cycles.



#4 emkay OFFLINE  

emkay

    Quadrunner

  • 9,673 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Sun Nov 18, 2018 5:00 AM

The low sounds play easily stable and can be used in any POKEY tracker.
According to your thread on Atarionline: Raster did the "SID" voice, by just using the 1st channel one pitch higher.
In every tracker it is possible to use the PWM sound.
It's the only way to have something like "music" in 15kHz. But people don't want it , thus no special Tracker exists.
It's just to bring the two filter channels to a common start, which works perfectly, if there is a short playing of both channels at the highest frequency. So the offset on both channel only varies in between the length of the smallest wave, which shows less differences , the lower a note gets.

The most satisfying part is that higher notes get a better pitch and can be adjusted in the "pulse Density" for better volume vontrol.

Things can be done better, but the tunes in the "POKEY DEMO" run all stable in the meaning of sound creation.



It's just that dark orbit that people don't seem to like. So no real development there in any tracker...

#5 makary OFFLINE  

makary

    Star Raider

  • Topic Starter
  • 88 posts

Posted Sun Nov 18, 2018 5:34 AM

Thanks.

 

You're right Heaven. 'Underrated' is the right word here. It's TMC2.0 in fact, a quite advanced tool, created with Grayscale guys as support.

 

Yeah Rybags, a lot to explore. There are some musicians exploring couple interesting ideas, not very active here for some reasons. I hope we'll hear some nice stuff sooner or later.

 

Edit: source file added (.tm2)

Attached Files


Edited by makary, Sun Nov 18, 2018 6:12 AM.


#6 _The Doctor__ OFFLINE  

_The Doctor__

    Flux Capacitor Master Craftsman

  • 6,257 posts
  • Location:10-0-11-00:02

Posted Sun Nov 18, 2018 8:59 AM

it's not a dark orbit people 'don't like' it's an orbit folks without the tools or vehicle can't achieve is all. But this looks like that is changing and we may soon see more folks in orbit as they leave the stratosphere.



#7 emkay OFFLINE  

emkay

    Quadrunner

  • 9,673 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Sun Nov 18, 2018 9:33 AM

There are some musicians exploring couple interesting ideas, not very active here for some reasons.


Yeah, only God knows of their evil burns.

#8 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 374 posts
  • Location:Olomouc, Czech Republic

Posted Sun Nov 18, 2018 11:15 AM

The low sounds play easily stable and can be used in any POKEY tracker.
According to your thread on Atarionline: Raster did the "SID" voice, by just using the 1st channel one pitch higher.
In every tracker it is possible to use the PWM sound.
It's the only way to have something like "music" in 15kHz. But people don't want it , thus no special Tracker exists.
It's just to bring the two filter channels to a common start, which works perfectly, if there is a short playing of both channels at the highest frequency. So the offset on both channel only varies in between the length of the smallest wave, which shows less differences , the lower a note gets.

 

Yes, listen to the guy this time .. I was playing a bit with it yesterday, and you can indeed reset the phase reliably by using 0 frequency for 1 frame on both filter channels. In RMT you can control both channels individually .. you just need to use 2 instruments, and check the filter checkbox on the left on one of them .. you simply don't use the 6 command and the 'dot' under the envelope.

And yes, it's mostly useful in 15kHz. Even in 64k you can get some nice sounds out of it, but you can't use it on a bass.



#9 makary OFFLINE  

makary

    Star Raider

  • Topic Starter
  • 88 posts

Posted Sun Nov 18, 2018 4:14 PM

I'm curious R0ger, because I went through this some time ago. So are you referring to some sort of pulse width modulation or are you referring to setting a constant pulse width of a waveform? The latter works when using this checkbox/no 6/no dot/two instruments setting. But I'd love to hear the former, this PWM working fine using this technique. Can you provide some RMT/XEX/instrument file please?


Edited by makary, Sun Nov 18, 2018 4:19 PM.


#10 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,464 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Sun Nov 18, 2018 5:01 PM

I've tried to get a sort of PWM sound in a tracker. And I don't mean an accidental effect, but something more or less stable and predictable. The idea is a development of Raster's idea from his 'Delta' cover and 'C64 synth' instrument. Here is a mediocre example, but I hope you can hear and see what is going on the first channel. XEX included as well.

 

That sounds fantastic - can't wait to try on the proper stereo with the subs!



#11 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 374 posts
  • Location:Olomouc, Czech Republic

Posted Sun Nov 18, 2018 5:41 PM

Here I'm including examples of resetting the phase in RMT with 100 command (frequency 0).

 

If you play the xex, first there is just some different noise in channels 1 and 3, to show the effect works with Pokey in random state.

 

After that there are 3 series of tones. I suggest turning on the oscilloscopes in Altirra.

 

Everything is in 15kHz.

 

First there is bass made by instruments Bass1a and Bass1b. This is supposed to generate tone with increasing pulse width, but always starting at zero.

Bass1a is on channel 1, it uses Audctl bit Fi1+3. First frame has zero volume, and frequency 0 (command 100). After that you have simple A distortion, and no command.

Bass1b does not use any Audctl bits, and it plays on channel 3. Since Bass1a turned the filter on, Bass1b doesn't have to. Bass1b also uses first frame with 0 frequency (100). Second frame uses command 200, but that does nothing in this instrument, let's ignore it for the moment. It will get more use later.

And in third frame there is loop with command 201 .. in other words, play frequency lower by 1. This continuously makes the phase of channel 3 lag behind channel 1, and it makes the pulse wider and wider. The channel itself generates no tone, it has 0 volume. You can add some of this channel (distortion A, volume 4) into the mix, it makes the bass beefier. I left it simple for the demonstration.

This instrument is similar to default RMT filter, except the phase is reset every time. It also demonstrates how to make filter manually using 2 channels.

 

After that there is bass with more complex phase control. The tone starts with low pulse width .. but not zero. It makes the pulse go wider for a moment, then back to the starting value, and then it stops at constant pulse width. It's done using instruments Bass2a and Bass2b.

Bass 2a is exactly the same as in the first case. Frame with 100, constant tone after that.

Bass2b is similar to Bass2a, but there are few differences.

First frame is the same, command 100. Second frame is different. There is command 204. This means playing lower frequency for one frame .. in other words, make the pulse grow wider for one frame. It's basically used to define starting pulse width. You can change this parameter to different values to get different starting pulse width (more about this later). Third frame uses no modulation, command 200. Which would normally mean constant pulse width.

But in this instrument I also use tone table. It allows for slower change of frequency (which means pulse width). The tone table is in frequency mode, the first frame has 01 in it, which is the same as using 201 command. So for the duration of the first tone table frame the pulse grows wider.

After that there is FF. This will make the pulse go narrower. And after that there is loop on 0, which will fix the pulse width.

 

Third example is fixed pulse width. It uses instruments Bass3x. For every different pulse width I need new instrument in RMT. But only for the second channel. Bass3a in channel 1 is the same as in previous examples. Bass3b is similar as before. The second frame is important. That one sets the initial pulse width. Bass3b uses command 201. Bass3c uses 203. Bass3d 205 and bass 3d 207. Third, looped frame uses 200, in other words fixed phase, and no tone table is used.

The track is done so channel 1 only uses Bass3a, and on channel 3 there is variation of the different pulse widths.

 

 

Attached Files

  • Attached File  bass.zip   2.47KB   42 downloads


#12 makary OFFLINE  

makary

    Star Raider

  • Topic Starter
  • 88 posts

Posted Mon Nov 19, 2018 2:00 AM

Thanks for more comments.

 

Well done R0ger! I'm not using RMT anymore but I'm definitely going to dig into your files thoroughly. People at Discord might be interested as well.


Edited by makary, Mon Nov 19, 2018 2:00 AM.


#13 makary OFFLINE  

makary

    Star Raider

  • Topic Starter
  • 88 posts

Posted Mon Nov 19, 2018 3:52 PM

I've looked into the files.

 

 

First there is bass made by instruments Bass1a and Bass1b. This is supposed to generate tone with increasing pulse width, but always starting at zero.

Bass1a is on channel 1, it uses Audctl bit Fi1+3. First frame has zero volume, and frequency 0 (command 100). After that you have simple A distortion, and no command.

Bass1b does not use any Audctl bits, and it plays on channel 3. Since Bass1a turned the filter on, Bass1b doesn't have to. Bass1b also uses first frame with 0 frequency (100). Second frame uses command 200, but that does nothing in this instrument, let's ignore it for the moment. It will get more use later.

And in third frame there is loop with command 201 .. in other words, play frequency lower by 1. This continuously makes the phase of channel 3 lag behind channel 1, and it makes the pulse wider and wider. The channel itself generates no tone, it has 0 volume. You can add some of this channel (distortion A, volume 4) into the mix, it makes the bass beefier. I left it simple for the demonstration.

This instrument is similar to default RMT filter, except the phase is reset every time. It also demonstrates how to make filter manually using 2 channels.

 

 

I see that it must be done this way. In TMC I just need this sort of instrument to get the result (some variation of the sound I used in my track from the first post):

 

1st.png

 

No two instruments + two notes + double patterns to get just one sound. In TMC it is just one instrument that is handling everything and is used as any regular 'filtered' instrument. In this example above: the first frame is that high frequency/reseting part. Later on you can see the envelope command 4 doing more or less the 'filter frequency' work of your bass1b. Here is the crucial difference RMT vs TMC. RMT doesn't have anything similar so that's why you need to multiply instruments, patterns and notes etc. to get the result. BTW: the PWM works in higher octaves with some restrictions. It needs to be slowed down by widening the envelope loop.

 

 

Third example is fixed pulse width. It uses instruments Bass3x. For every different pulse width I need new instrument in RMT. But only for the second channel. Bass3a in channel 1 is the same as in previous examples. Bass3b is similar as before. The second frame is important. That one sets the initial pulse width. Bass3b uses command 201. Bass3c uses 203. Bass3d 205 and bass 3d 207. Third, looped frame uses 200, in other words fixed phase, and no tone table is used.

The track is done so channel 1 only uses Bass3a, and on channel 3 there is variation of the different pulse widths.

 

3st.png

 

Something interesting above. I can set pulse width of a given instrument by using R:4 command from the pattern. Its value sets the 'filter frequency' so it can work as your different instruments bass3b-d. This way the pulse width can be set to various fixed values, no need to multiply instruments and patterns. There are some constraints due to the pattern density and arrangement of course so it depends on a given context, the commands share the column with notes unfortunately.

 

I'll make something more substantial to illustrate the above ;)



#14 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 374 posts
  • Location:Olomouc, Czech Republic

Posted Mon Nov 19, 2018 3:56 PM

That's neat. But basically it means you are also using 0 frequency for phase reset ?



#15 makary OFFLINE  

makary

    Star Raider

  • Topic Starter
  • 88 posts

Posted Mon Nov 19, 2018 5:10 PM

No, that's not what it means basically but yes, I use command 6 and values 00 (setting fq to 0)



#16 OmaOhneBH OFFLINE  

OmaOhneBH

    Space Invader

  • 38 posts
  • Location:Germany

Posted Mon Nov 19, 2018 5:26 PM

I'm not using RMT anymore...

 

So you are using TMC2.0 now?



#17 makary OFFLINE  

makary

    Star Raider

  • Topic Starter
  • 88 posts

Posted Mon Nov 19, 2018 5:38 PM

Hi,

 

yes, for the reasons like these above. Much more flexible and works on the real thing ;)



#18 emkay OFFLINE  

emkay

    Quadrunner

  • 9,673 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Tue Nov 20, 2018 2:15 AM

That's neat. But basically it means you are also using 0 frequency for phase reset ?


It is exactly that.
The difference is that RMT offers that Command 6 for joined channels.
It is also possible to use a separated channel with filter active, and to change the pitch with command 4 . Sou you could change the filter programming on channel one while it is possible to exchange the "instrument" on channel 2 of the filter voices.

#19 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 374 posts
  • Location:Olomouc, Czech Republic

Posted Tue Nov 20, 2018 5:00 AM

Hm .. at the moment RMT sets different frequencies to individual channels for liter. It uses F+1 on the second channel by default. You can change it with 6 command, but it's too late and the phase is unreliable.

But we could try to mod RMT so it sets the same frequency on both channels. To get to old effect, you would have to use 601 or 6ff manually. But you would be less limited in doing stuff like phase reset.

Have to try ..



#20 emkay OFFLINE  

emkay

    Quadrunner

  • 9,673 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Tue Nov 20, 2018 8:37 AM

Hm .. at the moment RMT sets different frequencies to individual channels for liter. It uses F+1 on the second channel by default. You can change it with 6 command, but it's too late and the phase is unreliable.
But we could try to mod RMT so it sets the same frequency on both channels. To get to old effect, you would have to use 601 or 6ff manually. But you would be less limited in doing stuff like phase reset.
Have to try ..


It could help to keep higher notes better stable.
It would help even more, if someone could path the RMT for playing the highest note for approx. 32 cycles on both channels on the start of a "filter" instrument.

#21 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 374 posts
  • Location:Olomouc, Czech Republic

Posted Tue Nov 20, 2018 8:46 AM

Why 32 cycles ? AFAIK the current counter has to be exhausted before new frequency is loaded. Maximum possible value is 255. In 15kHz mode that is 255/15.000 (roughly) .. which is almost one full frame on PAL, and MORE than one frame on NTSC. With 64kHz settings it's roughly 4 times less.



#22 emkay OFFLINE  

emkay

    Quadrunner

  • 9,673 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Tue Nov 20, 2018 9:15 AM

Why 32 cycles ? AFAIK the current counter has to be exhausted before new frequency is loaded. Maximum possible value is 255. In 15kHz mode that is 255/15.000 (roughly) .. which is almost one full frame on PAL, and MORE than one frame on NTSC. With 64kHz settings it's roughly 4 times less.


It's about playing the high tone as short as possible, to heave it unhearable , and not interfering the flow of the tune.

Edited by emkay, Tue Nov 20, 2018 9:16 AM.


#23 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 374 posts
  • Location:Olomouc, Czech Republic

Posted Tue Nov 20, 2018 9:31 AM

Thing is you have to play it long enough so the value is even used. And 'long enough' is one frame in 15kHz.



#24 makary OFFLINE  

makary

    Star Raider

  • Topic Starter
  • 88 posts

Posted Tue Nov 20, 2018 10:52 AM

 

So you are using TMC2.0 now?

 

BTW. Music ProTracker is interesting alternative as well. In addition to pokey sounds, samples can be used too. Old one, but still impressive.



#25 emkay OFFLINE  

emkay

    Quadrunner

  • 9,673 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Tue Nov 20, 2018 11:08 AM

Thing is you have to play it long enough so the value is even used. And 'long enough' is one frame in 15kHz.


And why does it work in 4x speed ?





Also tagged with one or more of these keywords: pokey, tracker, TMC, raster

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users