inside traktor, change the 'Interaction Mode' to Hold, not toggle.
inside traktor, change the 'Interaction Mode' to Hold, not toggle.
I tried, but it didn't work. May be the midi note ist the wrong one, which i send via the Atmel. I'm sending Ch3 CC70.
Btw.: How do you use more than 8 Potis at the µC. It only contains 8 adcs.
Let me sum up:
If i press the button (and holding it), I should send a 0x90 00 7F. And if I release the button, I should send a 0x80 00 7F?
I'm sorry asking such silly questions, but I am a beginner in terms of midi![]()
Last edited by DANrulz81; 03-27-2011 at 03:11 PM.
I am not used to sending direct midi messages.. I am using a midi library which makes it simple: midi.sendNoteOn(channel, note, velocity); midi.sendControlChange(channel, CC, value); etc...
A small excerpt of my code is below:
Midi Library: http://timothytwillman.com/itp_blog/?page_id=240Code:void midiStreamNote(const uint8_t pitch, const bool onoff) { #ifdef DEBUG uint8_t command = ((onoff)? 0x90 : 0x80); Serial.print("cmd:");Serial.print(command >> 4,HEX); // command type 0..15 Serial.print(" ch:");Serial.print((MIDI_CHANNEL & 0x0f),DEC); // channel 0..15 Serial.print(" note:");Serial.print(pitch & 0x7f,DEC); // note 0..127 Serial.print(" vel:");Serial.println(MIDI_VELOCITY,HEX); // velocity 0..127 #else if (onoff) { midi.sendNoteOn(MIDI_CHANNEL, pitch & 0x7f, 0x7f); } else { midi.sendNoteOff(MIDI_CHANNEL, pitch & 0x7f, 0x7f); } #endif } void midiStreamCC(const uint8_t cc, const uint8_t val) { #ifdef DEBUG Serial.print("cmd:");Serial.print(cc,DEC); // command type 0..15 Serial.print(" ch:");Serial.print(MIDI_CHANNEL,DEC); // channel 0..15 Serial.print(" val:");Serial.print(val & 0x7f,DEC); // note 0..127 Serial.print(" vel:");Serial.println(MIDI_VELOCITY,DEC); // velocity 0..127 #else midi.sendControlChange(MIDI_CHANNEL, cc, val); #endif }
Hi,
i figuered it out. It works fine by pressing the button sending note on, releasing sends note off. C is a language i don't understand, I write my software in Bascom, cause I grew up with Basic.
Thanks any way, you saved my day![]()
Glad I could help
I can certainly say that I've never heard of Bascom... but the thought of using a basic like language for avr programming is kind of neat... Please tell me they don't have GOTO![]()
Of course Bascom has GOTO, also Gosub, ...All of the happy Basic stuff. Now I have to figure out, how can I mux the Potis.
With using basic? I have no clue... are you able to do your own serial comms? most multiplexers use spi or in some cases i2c.. The 4051 should work for you.. set its 3 input select pins to select which input to read, then read the analog value from a single analog input... Here's the code I'm using... it is C, and it's using plenty of bitmath to be warned
Code:for(int i = 0; i < NUM_POTS; i++) { PORTD = (NUM_POTS > 8 && i >= 8) ? (i % 8) << 2 : i << 2; // set pins 2, 3 and 4 to value between 0 (00000) and 7 (11100) to select the pot if (i > 0 && (i % 8 == 0)) chipSelect++; // increase chip select index every 8 pots potValues[i] = analogRead(potReadPins[chipSelect]); if (abs(potValues[i] - prevPotValues[i]) > SMOOTHING) { prevPotValues[i] = potValues[i]; midiStreamCC(i, map(potValues[i],5,1020,0,127)); } }
OMG, C is so cryptic. I got special SPI and I2C commands in bascom, for e.g.:
Code:SPI: portb.7 = SCL portb.6 = MISO portb.5= MOSI portb.4 = SS spiout = 11010010I will try it as soon as possible. I got to buy some more potis and the other stuff like a 4051. Thanks anyway.Code:i2c: I2cstart I2cwbyte &H40 I2cwbyte &HAA I2cstop
|
Bookmarks