My project idea ... midi sequencer ...

XCore Project reviews, ideas, videos and proposals.
User avatar
williamk
Experienced Member
Posts: 114
Joined: Fri Oct 01, 2010 7:47 pm

My project idea ... midi sequencer ...

Post by williamk »

Ok, here's my project idea, as I need to start somewhere. ;-)

I really want to make a good 16 midi channel sequencer, but with some twists.

I'm looking at the quad-core xmos chip, so I have room for adding extras later on.

I want to use a 4x4 button pad with rgb leds, the one from SparkFun.

http://www.sparkfun.com/commerce/produc ... ts_id=9022

Image

Its a kit that has it all. (from what I can see) I guess its easy to control with the Xmos chip, right?

Now add a graphical LCD like this:

http://www.sparkfun.com/commerce/produc ... cts_id=710

Image

And a set of small buttons like this:

http://www.sparkfun.com/commerce/produc ... ts_id=8996

Image

A rotary encoder:

http://www.sparkfun.com/commerce/produc ... ts_id=9117

Image

And maybe a few extra buttons, for special features.

Now, the idea is to be able to record and play up to 16 tracks. To have clips that you can copy/paste/link

too. Each recording is a clip that shows in the graphical display.

Also, it would feature drum-recording in a 1x16 step mode, in a few different ways. That I will have to show

once its done, I guess. ;-)

I need to know if the 64k memory of each chip will handle the job. Songs can be saved on SD cards, I guess,

or dumped via MIDI.

Ah, yes, I will need some MIDI connectors, but that shouldn't be a problem from what I have seen.

I did see a guy who did a similar project, but its very limited, as it doens't let you chain patterns or

anything like I plan on doing.

Image

http://lennonluks.atspace.com/projects/ ... oject.html

It does look great, but my idea is to be able to record tracks, not just drums/synth-lines like he did.

Its like a Roland MC-50 mkII but with more tracks and better processor. Not to mention not use old

floppy-disks for storage.

Image

I do love that big rotary encoder the MC had. (I used to own one) But the unit its just too slow, and only

have 8 tracks. I do love the rythm track. (nice groove sequencer)

With a graphical lcd and the 16 led RGB buttons, I'm sure I can do some nice things with the project.

Another great addition is let the unit remote-control a computer running our plugins. (Wusik.com) For that I don't know yet how it will work, but I'm thinking on adding such feature.

Anyway, for now its all in my head, I have to figure out if XMOS is the best option for this, and if its doable...

Best Regards, WilliamK


Wusik Dot Com (http://www.Wusik.com)
William-K.com (http://www.William-K.com)
User avatar
nassim
Experienced Member
Posts: 112
Joined: Sun Sep 05, 2010 3:39 pm

Post by nassim »

hi

this is a great project ;) and there is many project use audio player and maybe you can take look in my project idea XVOIP to streaming audio. we need you experience in audio project.

and good luck with your project, i think there is many friend here how can help you. :D
User avatar
williamk
Experienced Member
Posts: 114
Joined: Fri Oct 01, 2010 7:47 pm

Post by williamk »

Thanks. I will start playing around with XMOS Emulator IDE, so I can learn XC and see what I can do with 64K of memory. :ugeek:

BTW: How do I convert 4Mbit to Kbytes? So I know how much memory I got in the external flash on the quad-core dev kit.

Wk
Wusik Dot Com (http://www.Wusik.com)
William-K.com (http://www.William-K.com)
User avatar
rp181
Respected Member
Posts: 395
Joined: Tue May 18, 2010 12:25 am
Contact:

Post by rp181 »

http://www.google.com/search?sourceid=c ... +kilobytes

8 bits in a byte.
1024 bytes in a kilobyte.
1024 kilobytes in a megabyte.

4 Mbits = 4 * 1024 * 1024 = 4194304 bits
4194304 / 8 = 524288 bytes
524288 / 1024 = 512 kilobtyes
User avatar
williamk
Experienced Member
Posts: 114
Joined: Fri Oct 01, 2010 7:47 pm

Post by williamk »

Thanks. I know about the size of each thing, but I never had to actually do the math to know what 4Mbit would look like. :oops: (I'm used to Megabytes)

So, 512K is good, now I wonder, can I use it to write stuff back or its just to store the code so the unit works in stand-alone mode? How fast is to read/write to it compared to a SD card?

Thanks again guys, I'm still at the very beginning, but I will get there eventually. ;-)
Wusik Dot Com (http://www.Wusik.com)
William-K.com (http://www.William-K.com)
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

I do not know in which of your treads this info best fits, but if you are thining about Audio-out from XMOS, generated by a polyphonic wave-table synth.

SD cards can be read in 3 ways, SPI mode - up to 1MBit /s, 1-bit mode 25 Mbit/s, 4-bit mode 100 Mbit/s.
SD card uses some block-mode for transfer so it's tricky to have random access with high transfer speeds, e.g. polyphonic sounds.

SRAM is expensive, but it's possible to connect a SDRAM chips to a G4 chip, without wait-state at 50MHz. Single SDRAM chips have the size up to 256 Mbit, and if you read some data-blocks, say 128 Byte at the time (into on chip SRAM) you can easily have > 30 MByte/s memory transfer (Probably around 50 MByte ??*), if you are using 16-bits data-width from the SDRAM. I sketched on a 32-bit SDRAM connection to a G4 earlier, but I do not remember my findings. It might be the case that you do not gain anything from using 32-bit data-width since a thread need's to process the incoming data for a real application, and that will limit the actual band-width to 50 MByte/s.

That would give you enough bandwidth for even 128 tones of polyphonic sound.

Any ideas about the interpolation method and sampling-frequency you are going to use for a wave-table ? (Non-ideal Interpolation creates distortion that will be aliased, Windows is a nice example if you do a playback of a 44.1 kHz material in 48 kHz)
Are we talking linear interpolation, up-sampling/ “high fs” and LP filtering ???

(A Byte i 8 Bits)

* http://archive.xmoslinkers.org/projects/ (waitstate is depending on the clock-speed)
http://www.micron.com/partscatalog.html ... DRAM/SDRAM
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
williamk
Experienced Member
Posts: 114
Joined: Fri Oct 01, 2010 7:47 pm

Post by williamk »

Well, in any event, I plan on starting things in a simpler way. LCD, mini-buttons, 4x4 Led Pads, nothing else. Either XC-1A or XC-2.

But, depending on the budget, and what people want, I was wondering on a 16x16 Led Pads, that would be great, so we would have all 16 midi tracks there, and also 16 bars for creating drum-beats. Still, only dreaming right now, as it would be a bit expensive to build. ;-)

Wk
Wusik Dot Com (http://www.Wusik.com)
William-K.com (http://www.William-K.com)
User avatar
williamk
Experienced Member
Posts: 114
Joined: Fri Oct 01, 2010 7:47 pm

Post by williamk »

I wonder if I can create structures with XC like I do with C++?

struct test
{
int Note;
int Frame;
}

And stuff like that. Or I need to create my own structure in a single int array? Possible, just a bit harder to code, but possible. ;-)

I need to figure out how the sequencer data will work. My idea is to have clips, but one large sequence data that is easy to playback. The only drawback is that each data can be a note, midi-cc or aftertouch. (what else?) Anyway, its late, and my brain is not functioning correctly... :oops:

Wk
Wusik Dot Com (http://www.Wusik.com)
William-K.com (http://www.William-K.com)
User avatar
paul
XCore Addict
Posts: 169
Joined: Fri Jan 08, 2010 12:13 am
Contact:

Post by paul »

Structures are valid in XC...

Cheers,
Paul

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
User avatar
williamk
Experienced Member
Posts: 114
Joined: Fri Oct 01, 2010 7:47 pm

Post by williamk »

I don't have any hardware yet, as it may take a while before I can actually start this project up. But in the meanwhile, I was thinking on using XC IDE to start up a few things. One, is the actually sequencer data, to see how many notes+events I can have with around 32k of memory. Another idea would be to use one chip-core just for the sequencer storage and playback, and another one for everything else. That way I have memory memory for the sequence. Or, in the last case, an external eeprom memory. (256k or 512k) I just need to check how fast I can read/write to those chips. I guess I could just use a small buffer to interface with those?

Wk
Wusik Dot Com (http://www.Wusik.com)
William-K.com (http://www.William-K.com)
Post Reply