claziss / CraveSeq

Simple library and examples to parse Behringer's Crave SEQ file.
GNU General Public License v3.0
3 stars 3 forks source link

TD-3 Format support #1

Open parashu-rama opened 3 years ago

parashu-rama commented 3 years ago

Hello!

I want to convert TD-3 seq to Crave seq.

Can you help me with TD-3 seq file support?

claziss commented 3 years ago

Sure, plz let me check the TD-3 format.

parashu-rama commented 3 years ago

Thank You! Da Funk.seq.zip

claziss commented 3 years ago

Hey, I will do first a TD-3 sequencer dumper, then I'll move in creating the convertor to Crave seq. It will take a bit.

parashu-rama commented 3 years ago

Thank You!

claziss commented 3 years ago

Hey @parashu-rama , please can you share with me a simple TD3 sequence of lenght 16, where u have a single C3 note in the first position? I do not have a TD3 and the Behringer tool requires one. I may need several such simple sequences to identify all the td3 seq file info.

parashu-rama commented 3 years ago

Me either :) Found this https://303patterns.com/ Will ask for support!

parashu-rama commented 3 years ago

Bought One! Wait for delivery :)

bradisbell commented 3 years ago

Hello all. I received an e-mail requesting me to check this thread.

I've documented the TD-3 MIDI implementation here: https://303patterns.com/td3-midi.html I haven't looked at the sequence files saved from Synthtribe in awhile, but if I remember correctly, they basically followed the same format as you get via SysEx. If you find this documentation useful, please feel free to consider dropping a link back to 303patterns.com. :-)

Also, if you want to use the Synthtribe tool before your actual TD-3 arrives in the mail, all you need is a MIDI port labeled TD-3. Use your favorite MIDI tool to create such a port, such as Tobias Erichsen's rtpMIDI or loopMIDI: http://www.tobias-erichsen.de/software.html

claziss commented 3 years ago

@bradisbell Thanks for the info !

claziss commented 3 years ago

@parashu-rama I think I've cracked. The listing of DaFunk:

[G1       ]
[A#3          ]
[G2   A   ]
[F3       ]
[D#2    S A   ]
[C2 S     ]
[C1 S A   ]
[C3 S     ]
[D#3      A   ]
[D#1          ]
[F3   A   ]
[G3 S A   ]
[A#1          ]
[G1   A   ]
[C1   A   ]
[G2   A   ]

I still need to clean the implementation up, there are some fields which are not clear to me what they represent. However, we can go further a bit and think how we map the TD-3's slide and accent. Clearly we can map TD3's accent to Crave's accent, but what we do with TD3 slide? Shall we map it to Crave's glide or note length?

parashu-rama commented 3 years ago

Congratulation! My td-3 should be delivered before September 13. We can test the sound of slide in both versions or implement both options to choose from using the command line parameter. Or ignore it :)

eg --slide none/glide/length

claziss commented 3 years ago

That is a good idea.

parashu-rama commented 3 years ago

Manually enter pattern in SynthTribe with glide and try to txtdump it.

  1. Unknown header because crave version 1.1.2
  2. Change to 1.1.1 in hexeditor - octave mismatch - but sound good
Swing: 50%   Length 16
[G2          64 x1 ####     ]
[A#3             64 x1 ####     ]
[G3   A      64 x1 ####     ]
[F4          64 x1 ####     ]
[D#3    G A      64 x1 ####     ]
[C3 G        64 x1 ####     ]
[C2 G A      64 x1 ####     ]
[C4 G        64 x1 ####     ]
[D#4      A      64 x1 ####     ]
[D#2             64 x1 ####     ]
[F4   A      64 x1 ####     ]
[G4 G A      64 x1 ####     ]
[A#2             64 x1 ####     ]
[G2   A      64 x1 ####     ]
[C2   A      64 x1 ####     ]
[G3   A      64 x1 ####     ]

dafunk-crave.seq.zip

claziss commented 3 years ago

It is an interesting project, but step by step. Let's first finish the the TD3 to Crave (and other way around?) project.

claziss commented 3 years ago

@parashu-rama I've pushed a crude TD3 seq parser. Please give it a try and let me know how does it work. To parse a TD3 seq file just pass -t option. For example:

 ./txtdump -t td3/DaFunk.seq 

The txdump without the -t option will parse the crave specific sequence.

parashu-rama commented 3 years ago

Works like a charm! Thanks!

parashu-rama commented 3 years ago

Probably Crave octave mismatch

CraveSeq % ./txtdump -t Da\ Funk.seq
Parse TD3 seq file ...
Swing: 0%    Length 16
[G1          ]
[A#3             ]
[G2   A      ]
[F3          ]
[D#2    S A      ]
[C2 S        ]
[C1 S A      ]
[C3 S        ]
[D#3      A      ]
[D#1             ]
[F3   A      ]
[G3 S A      ]
[A#1             ]
[G1   A      ]
[C1   A      ]
[G2   A      ]

CraveSeq % ./txtdump xz.seq

Swing: 50%   Length 16
[G2          64 x1 ####     ]
[A#4             64 x1 ####     ]
[G3   A      64 x1 ####     ]
[F4          64 x1 ####     ]
[D#3    G A      64 x1 ####     ]
[C3 G        64 x1 ####     ]
[C2 G A      64 x1 ####     ]
[C4 G        64 x1 ####     ]
[D#4      A      64 x1 ####     ]
[D#2             64 x1 ####     ]
[F4   A      64 x1 ####     ]
[G4 G A      64 x1 ####     ]
[A#2             64 x1 ####     ]
[G2   A      64 x1 ####     ]
[C2   A      64 x1 ####     ]
[G3   A      64 x1 ####     ]
Снимок экрана 2021-09-10 в 09 39 26
claziss commented 3 years ago

Yes the octave number may be off by one as I am counting from zero. I will check this.

claziss commented 3 years ago

@parashu-rama Please check the latest push. I've added the '-d' option which is parsing the TD3 sequence file, and dumps it as a Crave sequence file. The Crave sequence file has .crave.seq extension. It is still a very crude implementation, but the output looks alright.

I've also corrected the octave missmatch.

parashu-rama commented 3 years ago

It working! Thank You! https://youtu.be/Q4KkNYIL8iE

parashu-rama commented 3 years ago

At last a simple TD3 sequence of lenght 16, where u have a single C3 note in the first position. singleC3.seq.zip

claziss commented 3 years ago

It looks like the last 4bytes from seq file are set. I need to figure out their meaning. The TB 303 (and TD3) should have something about note length, maybe this is the one.

parashu-rama commented 3 years ago

TD-3 gate length 50 and 100 c3l.seq.zip

Снимок экрана 2021-09-14 в 09 35 49

Crave

Снимок экрана 2021-09-14 в 09 37 03
claziss commented 3 years ago

When slide is on, the TD-3 editor shows the note as 100% open.

parashu-rama commented 3 years ago

oops, sorry

Снимок экрана 2021-09-14 в 10 18 12

Any other test?

Снимок экрана 2021-09-14 в 15 11 38
parashu-rama commented 3 years ago

what we do with TD3 slide? Shall we map it to Crave's glide or note length?

I think 100% length better parser.c.diff.txt

claziss commented 3 years ago

what we do with TD3 slide? Shall we map it to Crave's glide or note length?

I think 100% length better parser.c.diff.txt

Updated as you suggested. Plus I don't check for TD3 version any longer.

parashu-rama commented 3 years ago

Thanks!

Are you interested in parsing the uno synth patch sequence or I close this issue?

claziss commented 3 years ago

I need to fix the obvious snafus for this implementation first. Probably it is a good idea to use something more highlevel like Python, and after that to parse the Uno too. I'll close the issue my self.

parashu-rama commented 3 years ago

How I can help You?

claziss commented 3 years ago

For the time being nothing to do on your side, I will have an update soon, and then I would like to ask you to compare the sound from Crave and TD3 ;) Still decoding the last bits of TD3 seq format, and I think I've got a good idea what every filed does.

parashu-rama commented 3 years ago

https://youtu.be/CyGYl5CtBpI

claziss commented 3 years ago

@parashu-rama Thanks for the demo, any chance to use your TD-3 and record only the DaFunk seq in a wave and share it? Also, please find my latest update, with the missing link ;) namely the sustain note of TB-3. I do not think, I do a good job when creating the crave sequence with sustain.

parashu-rama commented 3 years ago

140921.m4a.zip

claziss commented 3 years ago

I've made some mods in how to handle the TD3' sustain pitch feature. I hope it sounds good on a Crave. Anyhow, the above dafunk track looks all right although I couldn't get to much acid from my Crave. @parashu-rama please make a new issue with the Uno sequencer, I'll check what is its format in a shot while. Cheers.

parashu-rama commented 3 years ago

Last note length bug? ./txtdump -d I\ feel\ love.seq Parse TD3 seq file and convert... Swing: 50% Length 8 01:[C2 A #### ] 02:[C3 A #### ] 03:[C2 A #### ] 04:[C3 A #### ] 05:[G2 A #### ] 06:[G2 A #### ] 07:[A#3 A #### ] 08:[A#3 A ######## ]

Снимок экрана 2021-09-15 в 17 10 00

I feel love.zip

claziss commented 3 years ago

@parashu-rama fixed

parashu-rama commented 3 years ago

Thanks!

parashu-rama commented 2 years ago

Probably octave mismatch 02 step?

./txtdump -t Da\ Funk.seq Parse TD3 seq file ... Swing: 50% Length 16 01:[G1 #### ] 02:[A#4 #### ] 03:[G2 S ######## ] 04:[F3 #### ] 05:[D#2 S A ######## ] 06:[C2 A #### ] 07:[C1 S A ######## ] 08:[C3 A #### ] 09:[D#3 S ######## ] 10:[D#1 #### ] 11:[F3 S ######## ] 12:[G3 S A ######## ] 13:[A#2 #### ] 14:[G1 S ######## ] 15:[C1 S ######## ] 16:[G2 S ######## ]

claziss commented 2 years ago

C2 (TD3) is 0x18 (24 decimal), the second position has 0x2e value (46 decimal), hence, there are 22 pitches between the two notes:

Note Value
C2 24
C#2 25
D2 26
D#2 27
E2 28
F2 29
F#2 30
G2 31
G#2 32
A3 33
A#3 34
B3 35
C3 36
C#3 37
D3 38
D#3 39
E3 40
F3 41
F#3 42
G3 43
G#3 44
A4 45
A#4 46
B4 47

To me, the second pitch should be A#4.

parashu-rama commented 2 years ago

I think that octave begins with C, not A 60281adc9a9727 71960019 jpg .

claziss commented 2 years ago

Yes, that is true, if you are considering C major scale. I use A major scale for printing. However, the seq file should be correct. I will revert this patch

parashu-rama commented 2 years ago

Thank you for the clarification!