Show Posts
Pages: 1 2 [3]
31  Using Arduino / Audio / Re: fluxamasynth on: January 07, 2013, 06:57:53 pm
 smiley-red smiley-red smiley-red??????????
can't find data.h anywhere.


Code:
#include "data.h"            // this is the file with the data generated by
                             // midi2fluxama.pl

I don't know how to use midi2fluxama.pl in the arduino compiler

I didn't see it here.  http://ardublog-codeman.blogspot.com/2012/01/midi-fluxmasynth-converter-version-10.html

how do I generate data.h with midi2flux.pl



breaking news i have just paid for a midi controler board "arduino" i hope this works for my fluxamasynth
32  Using Arduino / Audio / Re: fluxamasynth on: January 07, 2013, 01:52:43 am
data.h?  smiley-red

i did'nt get any thing like this.
33  Using Arduino / Audio / Re: fluxamasynth on: January 07, 2013, 01:29:43 am
Code:
const int events=midi_data.count();
"midi data" says not declared in this scope
34  Using Arduino / Audio / Re: fluxamasynth on: January 07, 2013, 01:11:11 am
Unit8_t or 8_t
35  Using Arduino / Audio / Re: fluxamasynth on: January 07, 2013, 12:52:32 am
Code:
//
// SoftFluxaSynthSMF.pde: Simple player for byte code files which can be
//                        generated  from MIDI format 0 or 1 files with
//                        midi2fluxama.pl
//
// Copyrights:
// Copyright (C) 2012 Holger Wirtz <dcoredump@gmail.com>
//
// This program may be modified and distributed under the
// terms of the GNU General Public License v3. You should have received
// a copy of the GNU General Public License along with this
// program; if not, write to the Free Software Foundation, Inc.
// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// USE THIS PROGRAM AT YOUR OWN RISK!
//
// This program code uses "Fluxamasynth_NSS.h" which ca be found at
// http://wiki.moderndevice.com/uploads/MD/Fluxamasynth.zip
//
// The code is testet with Arduino-0.22 but should be easy
// portable to Arduino-1.0.
//
// PREREQUIREMENTS
// You also need the following libraries:
// NewSoftSerial.h http://arduiniana.org/libraries/newsoftserial/
// Flash.h http://www.pjrc.com/teensy/td_libs_MsTimer2.html
// FlexiTimer2.h http://arduiniana.org/libraries/flash/
//
// See http://arduino.cc where to get the libraries and how to install them.
//
// If someone has MIDI data which sounds amazing and is licensed "free" please
// drop me the MIDI oder header file for including in this distribution.
//

#include <Fluxamasynth_NSS.h>
#include <NewSoftSerial.h>   // for software serial (using pin 4)
#include <Flash.h>           // needed for storing the song data in PROG_MEM
#include <FlexiTimer2.h>     // for correct, interrupt based timing
#include "data.h"            // this is the file with the data generated by
                             // midi2fluxama.pl

#define MASTER_VOL_MAX 100    // the maximum volume

Fluxamasynth synth;
unsigned int sp;  // the song pointer
unsigned long tempo=500000L;
const int events=midi_data.count();

void setup()
{
  synth.midiReset();
  synth.setMasterVolume(MASTER_VOL_MAX);
  event();
}

void loop()
{
  ;
}

void event()
{
  unsigned long tmp_ulong=0UL;
  unsigned int tmp_uint=0,bend=0,wait=0,tmp_sp=0;
  byte i=0;

  // save the actual song pointer
  tmp_sp=sp;

  if(sp<events)
  {
    // special handling of command 7 (delay)
    if((midi_data[sp+1]&0x0f)==7)
    {
      // for delaying next event >255 ticks
      for(i=0;i<2;i++)
      {
        tmp_uint=(unsigned int)midi_data[sp+i+1];
        wait+=tmp_uint<<((1-i)*8);
      }
      sp+=4;
    }

    if(midi_data[tmp_sp]+wait>0)
    {
      // timer for the next event
      FlexiTimer2::set((((float)tempo/1000)*(((float)midi_data[tmp_sp]+wait)/ppqn)),event);
      FlexiTimer2::start();
    }

    // check the type of event
    switch(midi_data[sp+1]&0x0f)
    {
    case 0:  // NoteOn
      synth.noteOn(midi_data[sp+1]>>4,midi_data[sp+2],midi_data[sp+3]);
      sp+=4;
      break;
    case 1:  // NoteOff
      synth.noteOff(midi_data[sp+1]>>4,midi_data[sp+2]);
      sp+=3;
      break;
    case 2:  // Controller
      synth.setChannelController(midi_data[sp+1]>>4, midi_data[sp+2],midi_data[sp+3]);
      sp+=4;
      break;
    case 3:  // PitchBend
      for(i=0;i<2;i++)
      {
        tmp_uint=(unsigned int)midi_data[sp+i+1];
        bend+=tmp_uint<<((1-i)*8);
      }
      synth.pitchBend(midi_data[sp+1]>>4, bend);
      sp+=4;
      break;
    case 4:  // ProgramChange
      synth.programChange(0,midi_data[sp+1]>>4, midi_data[sp+2]);
      sp+=3;
      break;
    case 5:  // Aftertouch
      synth.setChannelAftertouch(midi_data[sp+1]>>4, midi_data[sp+2]);
      sp+=3;
      break;
    case 6:  // Tempo
      tempo=0UL;
      for(i=0;i<4;i++)
      {
        tmp_ulong=(unsigned long)midi_data[sp+i+2];
        tempo+=tmp_ulong<<((3-i)*8);
      }
      sp+=6;
      break;
    }

    if(midi_data[tmp_sp]==0)
      event();
  }
  else
  {
    // after the end of the song reset the Fluxamasynth
    synth.midiReset();
    FlexiTimer2::set(5000,event);
    FlexiTimer2::start();
    return;
  }
}
///i just put the fluxamasynth librarys in the audio librarys folder
thanks on that tip
 smiley smiley smiley smiley smiley smiley smiley smiley
after adding the librarys
says "byte not declarded."
36  Using Arduino / Audio / fluxamasynth on: January 06, 2013, 11:21:35 pm
hello i am just trying to get a sound out of my fluxamasynth board. I have the right drivers for my computer "arduino uno r3"
the fluxamasynth is connect to the uno.

midi2fluxama-1.01

http://ardublog-codeman.blogspot.com/

i am using this guys code. and it won't compile.

it says

fluxamasynth does not name type


for this data

Fluxamasynth synth;




sorry all that I annoyed you all with the bagpipe chanter theroy
37  Using Arduino / Audio / Re: Fluxamasynth Bagpipe chanter on: January 04, 2013, 12:12:40 am
noob...... THATS WHY MY KARMA IS 0

Parameters.
for stuff like this

 
void noteOn(byte channel, byte pitch, byte velocity);

i don't know how to set this up.
 
I think thats it.

 No, don't think your stupid. Noob here! I only programed one c++ program in my life.
hello world. java 4-8 programs.
My consin is a computer programer, he will help me better.
please have mercy.
38  Using Arduino / Audio / Re: Fluxamasynth Bagpipe chanter on: January 03, 2013, 04:12:04 pm
i need to know how to add values to the library to finnish it.
 


if i can't program it to do all the things i want,  i just need to hear midi notes from the damn thing.
39  Using Arduino / Audio / Re: Fluxamasynth Bagpipe chanter on: January 03, 2013, 03:53:58 pm
//
// SoftFluxaSynthSMF.pde: Simple player for byte code files which can be
//                        generated  from MIDI format 0 or 1 files with
//                        midi2fluxama.pl
//
// Copyrights:
// Copyright (C) 2012 Holger Wirtz <dcoredump@gmail.com>
//
// This program may be modified and distributed under the
// terms of the GNU General Public License v3. You should have received
// a copy of the GNU General Public License along with this
// program; if not, write to the Free Software Foundation, Inc.
// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// USE THIS PROGRAM AT YOUR OWN RISK!
//
// This program code uses "Fluxamasynth_NSS.h" which ca be found at
// http://wiki.moderndevice.com/uploads/MD/Fluxamasynth.zip
//
// The code is testet with Arduino-0.22 but should be easy
// portable to Arduino-1.0.
//
// PREREQUIREMENTS
// You also need the following libraries:
// NewSoftSerial.h    http://arduiniana.org/libraries/newsoftserial/
// Flash.h      http://www.pjrc.com/teensy/td_libs_MsTimer2.html
// FlexiTimer2.h   http://arduiniana.org/libraries/flash/
//
// See http://arduino.cc where to get the libraries and how to install them.
//
// If someone has MIDI data which sounds amazing and is licensed "free" please
// drop me the MIDI oder header file for including in this distribution.
//

#include <Fluxamasynth_NSS.h>
#include <NewSoftSerial.h>   // for software serial (using pin 4)
#include <Flash.h>           // needed for storing the song data in PROG_MEM
#include <FlexiTimer2.h>     // for correct, interrupt based timing
#include "data.h"            // this is the file with the data generated by
                             // midi2fluxama.pl

#define MASTER_VOL_MAX 100    // the maximum volume

Fluxamasynth synth;                     smiley-razz smiley-razz :Pthis says fluxamasynth does not name type smiley-razz smiley-razz smiley-razz smiley-razz smiley-razz
unsigned int sp;  // the song pointer
unsigned long tempo=500000L;
const int events=midi_data.count();

void setup()
{
  synth.midiReset();
  synth.setMasterVolume(MASTER_VOL_MAX);
  event();
}

void loop()
{
  ;
}

void event()
{
  unsigned long tmp_ulong=0UL;
  unsigned int tmp_uint=0,bend=0,wait=0,tmp_sp=0;
  byte i=0;

  // save the actual song pointer
  tmp_sp=sp;

  if(sp<events)
  {
    // special handling of command 7 (delay)
    if((midi_data[sp+1]&0x0f)==7)
    {
      // for delaying next event >255 ticks
      for(i=0;i<2;i++)
      {
        tmp_uint=(unsigned int)midi_data[sp+i+1];
        wait+=tmp_uint<<((1-i)*smiley-cool;
      }
      sp+=4;
    }

    if(midi_data[tmp_sp]+wait>0)
    {
      // timer for the next event
      FlexiTimer2::set((((float)tempo/1000)*(((float)midi_data[tmp_sp]+wait)/ppqn)),event);
      FlexiTimer2::start();
    }

    // check the type of event
    switch(midi_data[sp+1]&0x0f)
    {
    case 0:  // NoteOn
      synth.noteOn(midi_data[sp+1]>>4,midi_data[sp+2],midi_data[sp+3]);
      sp+=4;
      break;
    case 1:  // NoteOff
      synth.noteOff(midi_data[sp+1]>>4,midi_data[sp+2]);
      sp+=3;
      break;
    case 2:  // Controller
      synth.setChannelController(midi_data[sp+1]>>4, midi_data[sp+2],midi_data[sp+3]);
      sp+=4;
      break;
    case 3:  // PitchBend
      for(i=0;i<2;i++)
      {
        tmp_uint=(unsigned int)midi_data[sp+i+1];
        bend+=tmp_uint<<((1-i)*smiley-cool;
      }
      synth.pitchBend(midi_data[sp+1]>>4, bend);
      sp+=4;
      break;
    case 4:  // ProgramChange
      synth.programChange(0,midi_data[sp+1]>>4, midi_data[sp+2]);
      sp+=3;
      break;
    case 5:  // Aftertouch
      synth.setChannelAftertouch(midi_data[sp+1]>>4, midi_data[sp+2]);
      sp+=3;
      break;
    case 6:  // Tempo
      tempo=0UL;
      for(i=0;i<4;i++)
      {
        tmp_ulong=(unsigned long)midi_data[sp+i+2];
        tempo+=tmp_ulong<<((3-i)*smiley-cool;
      }
      sp+=6;
      break;
    }

    if(midi_data[tmp_sp]==0)
      event();
  }
  else
  {
    // after the end of the song reset the Fluxamasynth
    synth.midiReset();
    FlexiTimer2::set(5000,event);
    FlexiTimer2::start();
    return;
  }
}
40  Using Arduino / Audio / Re: Fluxamasynth Bagpipe chanter on: January 02, 2013, 10:06:08 pm
I  got it, the board is already programed as a synth but i must add librarys. or the board needs programing as a synth with keys.
noob here! smiley-razz grumby mike that page you sent me looked like just schematics. I didn't learn any thing on programing.
41  Using Arduino / Audio / Re: Fluxamasynth Bagpipe chanter on: January 01, 2013, 07:52:02 pm
 smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry
c++ c++ c++ this is the programing code i need. i have no problem with keys. i am using touch senitive controls like wire to thumb tacks.
i did this with the echanter project from www.echanter.com
42  Using Arduino / Audio / Re: Fluxamasynth Bagpipe chanter on: January 01, 2013, 02:42:25 pm
 smiley-cry smiley-cry smiley-cry
I need to get the programing code right to make an midi bag pipe with all the 127 or 128 instruments.
I might add a board for midi in and midi out
43  Using Arduino / Audio / Re: Fluxamasynth Bagpipe chanter on: December 31, 2012, 11:33:46 am
I was hopeing to find code to make this an instrument smiley-cry

will this code work?????


Const Device = CB220 "when i tried to verify this it said CONST DOES NOT NAME TYPE


    Opencom 1,31250,3,30,20

Putstr 1,240,127,127,4,1,0,127,247 'set the master volume, you can change  from 0 to 127 modifing the last 127 number value


    Putstr 1,192,1 ' program change, we set the instrument from 0 to 127 that we want ,we change the last value..!!

    Putstr 1,144,60,64 ' play notes on
    Delay 1000 ' we put a pause
    Putstr 1,128,60,64 ' turn off notes

44  Using Arduino / Audio / Fluxamasynth Bagpipe chanter on: December 30, 2012, 07:21:05 pm
hi

 I am very new to all of this, the only project that I sucessfully finnished was the echanter from www.echanter.com
 I was using a arduino extracore chip and a usb bub 2 to do it.

The project i would like to start on is a Fluxamasynth with arduino uno stuck in board incase i need to reprogram it
with midi intrument. maybee and board with midi in midi out. and have all 128 instruments

I done little programing with java and c++

I have connected the arduino uno to fluxamasynth with a usb to the uno

I need to know where to start

Pages: 1 2 [3]