Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 23:04 25 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Chiptune Drumsynth with 16 Step Sequencer

     Page 1 of 2    
Author Message
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 10:35pm 27 Aug 2020
Copy link to clipboard 
Print this post

Hi ! I have programmed a small Chiptune Drumsynth.

You can programm 4 Channels (Basedrum, Snaredrum, Hihats, and ADditional Sound)
on 16 Steps. You can randomize the patterns and you can change volume on each step.
you can even temporarly store one pattern.

Maybe some of you like this programm.

Feel free to give some feedback.


Drummachine.zip


When you start the programm a small Helpscreen is shown...

If you press "H" while you are in the Editor you see more options


And now make some chiptune drums  
http://tweakerray.bandcamp.com
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 10:59pm 27 Aug 2020
Copy link to clipboard 
Print this post

Looking forward to trying this out.
 
Daren
Newbie

Joined: 05/08/2020
Location: United Kingdom
Posts: 25
Posted: 11:22pm 27 Aug 2020
Copy link to clipboard 
Print this post

Cool idea, I will definitely try this out, thanks for sharing
 
datawiz

Newbie

Joined: 10/08/2020
Location: United States
Posts: 26
Posted: 11:53pm 27 Aug 2020
Copy link to clipboard 
Print this post

Hi TweakerRay!
I have never used a tracker or anything like this on other computers, but I recently started writing code to do sounds on the cmm2, so I was really curious about your program. I've had a great time playing with this and making some funky chiptune beats (unfortunately, my wife doesn't appreciate them as much as I do).

I really like the randomize feature, it actually made much better music randomly that I could make intentionally... lol

It was very easy for me to figure out, and I can see where this could be the beginning of a really cool cmm2 tracker! I hope you continue to keep working on this!

Regards,
Rich/dw
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 03:42am 28 Aug 2020
Copy link to clipboard 
Print this post

Hi Tweaker, All,

I don't know what I am doing.... (Yes many have said that about me before      )

I keep hearing squwaks and schreeches from my speakers, is this normal? I expected drum and cymbal sounds.

Am I doing something wrong or is there something I am missing?

Can you offer sequence of key presses to get a reasonable rhythm from it?

Mind you, I am not criticising you..  Just wondering

Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 07:19am 28 Aug 2020
Copy link to clipboard 
Print this post

  datawiz said  Hi TweakerRay!
I have never used a tracker or anything like this on other computers, but I recently started writing code to do sounds on the cmm2, so I was really curious about your program. I've had a great time playing with this and making some funky chiptune beats (unfortunately, my wife doesn't appreciate them as much as I do).

I really like the randomize feature, it actually made much better music randomly that I could make intentionally... lol

It was very easy for me to figure out, and I can see where this could be the beginning of a really cool cmm2 tracker! I hope you continue to keep working on this!

Regards,
Rich/dw


Hi

Thanks for checking it out... its still in development.
But i am very proud how it turned out. Next ideas is that you also could change maybe the panning of the sounds... and maybe edit the sounds further.

Yes a tracker for this would be cool but as far as I am able to programm this i think soundwise this machine
Is very limited. Not like a SID on the C-64. But this limitation gives the CMM2 a unique sound ;-)

I have also programmed a synth with musical keyboard but right now you only can play one note at a time.
I am still a beginner and getting into MMbasic - i was happy to have learned about fields with 2 dimensions so i could do things much easie...

Thanks for checking out my programm

Cheers TweakerRay
http://tweakerray.bandcamp.com
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 07:24am 28 Aug 2020
Copy link to clipboard 
Print this post

  bigmik said  Hi Tweaker, All,

I don't know what I am doing.... (Yes many have said that about me before      )

I keep hearing squwaks and schreeches from my speakers, is this normal? I expected drum and cymbal sounds.

Am I doing something wrong or is there something I am missing?

Can you offer sequence of key presses to get a reasonable rhythm from it?

Mind you, I am not criticising you..  Just wondering

Kind Regards

Mick


Hi ! This is still an esrly concept. And you won‘t hear samples of cymbals or real drum sounds.
This programm uses the internal sounds it can produce. And this is really limited to squeeks and noisebursts. Think of this drummachine like a broken gameboy tries to do a drummachine ;-)

I will try that you could edit the sounds a little further but it will be at the end a chiptune drummachine not a fancy real drum machine  
http://tweakerray.bandcamp.com
 
Daren
Newbie

Joined: 05/08/2020
Location: United Kingdom
Posts: 25
Posted: 10:50am 28 Aug 2020
Copy link to clipboard 
Print this post

Had a quick play, good fun! It reminds me a bit of another running on BASIC drum machine which runs on a picaxe https://www.instructables.com/id/Super-GrooveAxe-Mini-Drum-Machine/

Might be worth looking at the code to see if you can get any inspiration for tap input?

I'm interested in CMM2 for music stuff too, quite a few ideas but not much programming chops yet. A few things I thought about:

Midi control of images/graphics
A Tracker
Sequencers
Midi monitor
GPIO trigger sequencer for Volcas/Modular gear etc
Midi speech synth

BTW I already got very rudimentary midi in and out working, it is pretty simple you can get a hobbytronics midi breakout or use a arduino midi shield then just connect to GPIO using breadboard female cables.
Edited 2020-08-28 20:51 by Daren
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 04:33pm 28 Aug 2020
Copy link to clipboard 
Print this post

Hi @ All - Here is V2 of my little Chiptune Drummachine ;-)

I have added a few features and also the keyboard layout is now a little bit
different.

You will now see all 4 rows and can edit them better I think.

to set a step on and off you need to press now POS1 and the END key
with the courserkeys you move your edit coursor now

you can set volumes on each of the steps so you have more variation of the pattern.

Also there are a few randomizastion options like randomize the steps or volume of
the different "Instruments" (BD/SD/HH/AS)

You can also mute the channels (Depending where your coursor is)
and also you can listen to 1 channel in SOLO Mode and toggle between solo channel
or the full mix ;-)

I have put the HH now to the left channel and the AS to the right channel..

I think it sounds better...

You can edit the sounds with the Funktionkeys F1 to F-8 and change the Frequencys

Feedback is much appreciated... I still need to figure out how I can describe the tempo in BEATS per Minute...

ENJOY !!!

Cheers TweakerRay


Drummachinev2.zip
http://tweakerray.bandcamp.com
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 07:31pm 28 Aug 2020
Copy link to clipboard 
Print this post

> I still need to figure out how I can describe
> the tempo in BEATS per Minute...


''''''' B.P.M. ''''''''

sustain=10
quiet=990  

print @(300,150)"B.P.M. = ",(60000/(sustain+quiet))

do
play sound 1,b,s,1000,25
pause sustain
play sound 1,b,s,1000,0
pause quiet
loop

my site
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 09:19am 29 Aug 2020
Copy link to clipboard 
Print this post

  hitsware2 said  > I still need to figure out how I can describe
> the tempo in BEATS per Minute...


''''''' B.P.M. ''''''''

sustain=10
quiet=990  

print @(300,150)"B.P.M. = ",(60000/(sustain+quiet))

do
play sound 1,b,s,1000,25
pause sustain
play sound 1,b,s,1000,0
pause quiet
loop


Hi ! Thanks a lot for this... I tried that but still can't figure it out correctly...
Maybe I need to give more input of the problem:

Right now the sounds have a delay of 20 ms (caused by pause 20 command)
so the notelenght of a drumsound is 20ms

I alter the tempo by adding a value to the variable tempo

so 20 + tempo is the timeconsumption of one step in my example i used 100 for tempo


right now there are 16 steps of this drummachine...
That means if I put a KICKdrum placed at all 4 mainssteps

# . . . # . . . # . . . # . . .
1       5       9       13

you have 4 BEATS per overall timeconsumption

so right now the complete delaytime is 120ms if tempo is set to 100

that would give me a bpm of 500 if I use that calculation above...

60000 / (20+100) = 500 So that can't be... And I figured that I had 4 beats...

So wouldn't it be that the correct BPM is then:

60000 / ((20+100)/4) ? which then would be 125 BPM ?


My wish is that I alter the tempo somehow that I can change the overall
timeconsumption of one step to the correct value for 1/16 Step so

if you press + or - in my programm that you really change the BPM Timing
not the pause value...

I am just a musician and not a good math expert... Has anyone any clue how I
can archieve that ?  Because 500 bpm is definitly wrong...

Cheers TweakerRay
http://tweakerray.bandcamp.com
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 11:53am 29 Aug 2020
Copy link to clipboard 
Print this post

Okay it seems I have managed to find a solution to my problem ;-)

The formular I used is:

60000 / ( 4 * y ) - 20 = x

while y will be my bpm

and   x will be the pause to be calculated for 16 steps (4 Beats)

Then I had an addition problem... printing all the visuals needs time too...


so I ran a timer from starting the 1st beat to end of all printing information...
that where about 2.9 ms or something... that needs also to be subtracted...

now the bpm's are rather stable and it seem to work ;-)

I will upload the new version later... but so far I think I managed to make it work !


http://tweakerray.bandcamp.com
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 01:11pm 29 Aug 2020
Copy link to clipboard 
Print this post

Hi ! Here is V3 of my small Chiptune Noise Drummachine ;-)

Drummachinev3.zip


Now the BPMs seem to work and you can randomize volume and also the steps.

Press "H" for the Helpscreen so you see all keys you can use.

The timing is okay for me... when you do some editing the machine seems to
need a little time so don't expect the playback to be rock solid while editing or doing changes on your beat... but when you're done it works okay for me ;-)

you can now also set a lane in solomode so you just hear the Lane or you can also mute lanes ... handy if you just want to hear maybe 2 lanes ;-)

And now enjoy programming some noise beats on your CMM2 :-)

Feedback is much appreciated !!!

Cheers TweakerRay  
http://tweakerray.bandcamp.com
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 03:38pm 29 Aug 2020
Copy link to clipboard 
Print this post

bpm = 60000 / (on + off )

1 / bpm = ( on + off ) / 60000

60000 / bpm = on + off

60000 / bpm = 20 + off

off = ( 60000 / bpm ) - 20


''''''' Mr. Metronome ''''''''

bpm=60

sound_time:

note_on=10
note_off=(60000/bpm)-note_on

print @(300,150)"B.P.M. = ",bpm

do while keydown(1)=0
play sound 1,b,s,1000,25
pause note_on
play sound 1,b,s,1000,0
pause note_off
loop

if keydown(1)=128 then bpm=bpm+1' up arrow
if keydown(1)=129 then bpm=bpm-1' down arrow
pause 200
goto sound_time

Edited 2020-08-30 04:43 by hitsware2
my site
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 08:02pm 29 Aug 2020
Copy link to clipboard 
Print this post

@hitsware2: Cool ! I check that metronome thing out !

Here is the latest Version V4


Drummachinev4.zip


You can now store 10 Patterns and recall them...

Next Idea would be that you can store them to sd card and reload the patterns...
And another Idea is to have some kind of Song mode where you can chain all patterns
and play them 1 after another... or maybe even play them in your selected order...

But I have some problem with storing them temporary... I used a field to store the informations. I am still a beginner and I would have loved to store them better.

Right now I have 10 Recall functions and 10 Store functions... I would have loved
to just have one and could still load the fields of information....

I thought of a field with maybe 4 dimenstions (if that is possible ? )

So like store this information (Patternnr, Lanenr, Volume info, Stepinfo)

for example Pattern 1 , Lane 1, Volume 1 , Step1
and so on..

Is there a clever way how I can store all this information and recall it ?

Right now each Storepage has its own Field
one with the Volume information on all 16 Steps for 4 Lanes

dim mvol1(4,16)

and one field with Stepinformation if the step is active on all 4 lanes

dim mset1(4,16)

If I could put them into another field or something...  to store which pattern it is
It would be cool... but I am too stupid to figure that out...

Anyone have an Idea ? Thanks and have a rocking weekend ;-)
http://tweakerray.bandcamp.com
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 01:13am 30 Aug 2020
Copy link to clipboard 
Print this post

With better screen

''''''' Mr. Metronome ''''''''

bpm=60

sound_time:

note_on=10
note_off=(60000/bpm)-note_on
print @(300,130)"up - down arrows adjust tempo "
print @(300,150)"    TEMPO",bpm,"  BPM"

do while keydown(1)=0
play sound 1,b,s,1000,25
pause note_on
play sound 1,b,s,1000,0
pause note_off
loop

if keydown(1)=128 then bpm=bpm+1
if keydown(1)=129 then bpm=bpm-1
pause 200
goto sound_time

my site
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 09:36pm 30 Aug 2020
Copy link to clipboard 
Print this post

And Here is V5 of my chiptune Drumsynth  

You can now also change the frequency of the single steps.
You can now store 16 Programmed Patterns to SD Card (They will be stored in a .txt file

I included 16 .txt files which has my stored programmed patterns -
so the programm will not get an error if the textfiles would not be there...

DD01.txt   - DD16.txt are the stored information of your programmed beats.
They hold the information where a step was positioned , which volume it has and which frequency...

Drummachinev5.zip

Press H for the Helpscreen so you can see the new commands and changes from the Keys

The Demo Song can be loaded with SHIFT + D
or you just load the additional stored patterns from file with "0" (Zero-Key)


Feedback is much appreciated ! Hope you like it!  

Cheers TweakerRay
http://tweakerray.bandcamp.com
 
Daren
Newbie

Joined: 05/08/2020
Location: United Kingdom
Posts: 25
Posted: 10:10am 01 Sep 2020
Copy link to clipboard 
Print this post

Ha, you are coming up with new versions quicker than I can try them - great effort!

I look forward to trying v5!
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 11:14am 01 Sep 2020
Copy link to clipboard 
Print this post

I didn't understand "POS1" in the instructions at first - maybe US keyboards have different labels. I had to press HOME/7 on the keypad. Also I found it easier to remember and understand all the controls and what they did by trying them. So I made some note of some things to try when you're learning the keys.

Here's what I came up with:

Press space to stop the playback, and space again to start it. Leave playback running.

Move somewhere in the top row using the up/down/left/right arrow keys, press Home/POS1 on the numeric keypad to turn on sound at that step in the pattern.
Move to another step in the top row and do it again. Then try some steps in the other rows.
Move to one of the steps you turned on, and turn it off with the End key.
Now you have some beats playing, you can turn the tempo up and down with + and -

Next you can try the stored patterns.

Press 0 to load them from the SD card, and start playing pattern 1.
Press 2 to change to then next pattern, press 2 a few times to try more patterns.
Then press w to change to the previous pattern.

(I haven't tried all the rest of the keys)
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 12:00pm 01 Sep 2020
Copy link to clipboard 
Print this post

  capsikin said  I didn't understand "POS1" in the instructions at first - maybe US keyboards have different labels. I had to press HOME/7 on the keypad. Also I found it easier to remember and understand all the controls and what they did by trying them. So I made some note of some things to try when you're learning the keys.

Here's what I came up with:

Press space to stop the playback, and space again to start it. Leave playback running.

Move somewhere in the top row using the up/down/left/right arrow keys, press Home/POS1 on the numeric keypad to turn on sound at that step in the pattern.
Move to another step in the top row and do it again. Then try some steps in the other rows.
Move to one of the steps you turned on, and turn it off with the End key.
Now you have some beats playing, you can turn the tempo up and down with + and -

Next you can try the stored patterns.

Press 0 to load them from the SD card, and start playing pattern 1.
Press 2 to change to then next pattern, press 2 a few times to try more patterns.
Then press w to change to the previous pattern.

(I haven't tried all the rest of the keys)





Hi ! Yes the Pos 1 = the Home key its called Pos1 on my keyboard ;)

So Basically the keyboard commands are very simple...

------------- EDIT & Playback Options -----------------
You move with the Coursorkeys (you can see below on which step you are and you have 4 Lanes called BD & SD & HH & AS.

You set a step with POS1 (Homekey) and you delete the step with End key
You can turn up the volume of the step with Pg Up / Pg down
You can change the pitch (Frequency) of the step with F / R

So that's your basic edit funtions... (you can only edit the pattern when the sequence is running...

The Tempo can be changed with + and -
Space - stops the playback and turns the playback back on.

---------------------------------- Listening Options ----------------------

You have the M key to "Mute" the selected Lane where you are... so you can basically
just hear 3 lanes or as much as you like. If a Lane is muted you will have a status below which shows that lane is muted

You also have the option to just listen to one Lane with the S Key for "Solo"

------------------------------ Storage Options  F9 - F12   -----------------------

Then you have you storage of the patterns:

you can store 16 Patterns temporary and 16 Patterns to SD Card

You can access the Temporary Storepage with 3 / E so you can select the temporary Storepage (This won't load a pattern just select the page - good for copy a pattern to another storepage)

With 2 and W you have a combined command it will go through the storepages
and will automatically recall the pattern from the next or previous stored memorypage
So with that you can step through the storepages and listen to your patterns...
(Its the same if you select the storepage with 3 / E and then you press the F11 to load the pattern into the running editor...

If you have for example made a beat you can store it temporary with F11
Or you can save the pattern to SD Card with F9
To recall it from SDCard you press F10 - Then the recalled pattern will load into the editor but its not yet into a temporary Memory slot.

you can load all 16 Patterns from SD Card with 0 (Zero)

and you can load a preprogrammed DEMOpattern (Just to hear something) with SHIFT + D

The F1 - F8 Keys are the Frequencies of the complete lanes...

For example you press F1 a few times then will all BD Steps get lower in sound
or you press F4 a few times and the SD will get higher in pitch on all steps
(Complete Lane)


-------------------------- Randomize Options ------------------------------------
You can randomize the steps on each Lane

Press 5 for randomize if the Step is set on the BD Lane
Press 6 for randomize if the Step is set on the SD Lane
Press 7 for randomize if the Step is set on the HH Lane
Press 8 for randomize if the Step is set on the AS Lane

You can randomize the Volumeinforamtion on each Lane the Keys below the numberkeys
5 / 6 / 7 / 8 - Which are this:

Press T for randomize Volume the BD Lane
Press Z for randomize Volume the SD Lane
Press U for randomize Volume the HH Lane
Press I for randomize Volume the AS Lane

So thats a little bit more detailed HELP  ;-)

Cheers TweakerRay
Edited 2020-09-01 22:40 by TweakerRay
http://tweakerray.bandcamp.com
 
     Page 1 of 2    
Print this page
© JAQ Software 2024