Thanks for the pre-orders everyone! Approx. 1/3 preordered already...

370

(24 replies, posted in Other Hardware)

Downstate, somewhat ironically, the questions that the original poster is asking are very well documented on the net and don't need to be asked on a chip forum!

371

(12 replies, posted in Sega)

lol

I won't.

373

(12 replies, posted in Sega)

I personally don't have any interest in making a keyboard interface for the genny smile

374

(12 replies, posted in Sega)

ultramega wrote:
little-scale wrote:

• Publish the protocol and schematic and code, and encourage SEGA music software developers to include support in their music software

lead by example!


??

375

(12 replies, posted in Sega)

Yes it can do serial at 300, 1200, 2400 and 4800. On either joystick port or on the EXP port on a model 1.

From memory you have a single byte location in memory that is where the data is coming in, as well as a bit being set or reset depending on whether or not data is present at the memory location. I don't believe that it has a serial buffer as such, so you would need to take that into account.

376

(12 replies, posted in Sega)

Absolutely it's possible.

• Get a micro that acts as a USB host.
• Synchronise with a slave USB keyboard HID device
• Output keystroke data as some custom protocol that interfaces with the Genesis' 9-pin connector
• Publish the protocol and schematic and code, and encourage SEGA music software developers to include support in their music software

377

(24 replies, posted in Other Hardware)

And finally if you connect eight buttons to pins 2 - 8 like in the diagram shown above (i.e. pin 2,3,4,5,6,7,8 --> switch || switch --> ground):


Then the following code should give you some ideas.

I haven't tried out any of these. YMMV.

byte MIDI_pitch[] = {60,62,63,65,67,69,71,72}; // value of MIDI pitch to associate with button
byte MIDI_velocity[] = {127,127,127,127,127,127,127,127}; // value of MIDI velocity to associate with button
byte MIDI_channel[] = {0,0,0,0,0,0,0,0}; // value of MIDI channel to associate with button

byte previous[8]; // place to store previous data byte for comparison
byte current;  // place to store current data byte for comparison

void setup() { // let's begin..
  Serial.begin(57600); // open serial port
  pinMode(2, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
  pinMode(3, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
  pinMode(4, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
  pinMode(5, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
  pinMode(6, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
  pinMode(7, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
  pinMode(8, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
  pinMode(9, INPUT); // set pin mode of button to input
  digitalWrite(2, HIGH); // activate internal Arduino resistor
} // end of the beginning

void loop() { // let's loop...
  for(int i = 0; i < 8; i++) {
  current = digitalRead(i+2); // read the current state of the button
  
  if(current != previous[i]) { // compare the current state of the button to previous state 
    previous[i] = current; // if it's change, store the current for future comparison
    Serial.write(0x90 + MIDI_channel[i]); // send MIDI status byte for note on event
    Serial.write(MIDI_pitch[i]); // send MIDI data byte for pitch component
    Serial.write((1 - current) * MIDI_velocity[i]); // send MIDI data byte for velocity component
  } // end if
  
  delay(10); // debounce
  }
} // end loop

378

(24 replies, posted in Other Hardware)

Also might be worth your time:
http://little-scale.blogspot.com.au/200 … -data.html
http://little-scale.blogspot.com.au/200 … -data.html

379

(24 replies, posted in Other Hardware)

The above examples can be extended upon to suite your own needs.

380

(24 replies, posted in Other Hardware)

A simple single-button example that features:
• De-bouncing of switch
• MIDI formatted code
• MIDI ---> Serial conversion
• The simplest hardware setup (no pull up / pull down resistors)


Arduino hardware:

Arduino code:

Max patch (you can make the PD equivalent):

381

(24 replies, posted in Other Hardware)

Well... there are LOTS of ways that you could do this.

What about this:
• use a PIN port message to read your digital inputs, assuming you
• measure the change from the last time you measured the PIN port
• if and only if its changed, write the PIN port data byte along a serial port to PD
• in PD, pick up the data byte, and trigger a sample if a certain bit has been set
• in PD, pick up the data byte and stop a sample playing back if a certain bit is reset


Or this:
• Use the digitalRead(pin) function to read a button pin
• If the pin's state has changed, send via a Serial.write(byte) function an encoded byte that takes the form of:
%XXXXXXXY where XXXXXXX is a number from 0 - 127 that corresponds to the button number ID and Y is the current value of the button
• In PD, reverse this process. So, read the byte coming from the arduino. Divide by 2 to get a number between 0 - 127 that is the button number ID. Modulo 2 the number to get a number between 0 and 1 to give you the state of the button with that particular button number ID. Use this information to trigger or stop a sample.

dosPrompt wrote:

Seb, in case I forget later can we talk about having some on the merch table at ssm please? big_smile

Hi Kristy, sure! Let's chat online tomorrow about it, and I'll also respond to your other email smile

???

Correct - by using the PayPal purchase button that will appear on little-scale.com

smile