Newbie question compiling error before i can do anything else nano 328

hi i am getting ready to make a aciduino very basic little sound device
and no luck because i get this error when testing

acidstepsequencer.ino i am installing this one uclock.h is a separate file in the folder used for this project

http://midilab.co/aciduino/

ok i hope you know this project with uclock etc...

/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/eightanaloginputs -I/usr/share/arduino/libraries/EEPROM /tmp/build1424494551257446226.tmp/AcidStepSequencer.cpp -o /tmp/build1424494551257446226.tmp/AcidStepSequencer.cpp.o
In file included from AcidStepSequencer.ino:4:0:
uClock.h:48:3: warning: anonymous type with no linkage used to declare variable ‘umodular::clock:: umodular::clock::state’ with linkage
} state;
^
uClock.h:53:3: warning: anonymous type with no linkage used to declare variable ‘umodular::clock:: umodular::clock::mode’ with linkage
} mode;
^
AcidStepSequencer.ino:35:28: error: ‘STEP_MAX_SIZE’ was not declared in this scope
AcidStepSequencer.ino:51:37: error: ‘TRACK_NUMBER’ was not declared in this scope
AcidStepSequencer.ino: In function ‘void ClockOut16PPQN(uint32_t*)’:
AcidStepSequencer.ino:97:36: error: ‘TRACK_NUMBER’ was not declared in this scope
AcidStepSequencer.ino:99:10: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:103:14: error: ‘NOTE_LENGTH’ was not declared in this scope
AcidStepSequencer.ino:106:5: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:140:112: error: ‘ACCENT_VELOCITY’ was not declared in this scope
AcidStepSequencer.ino:140:130: error: ‘NOTE_VELOCITY’ was not declared in this scope
AcidStepSequencer.ino: In function ‘void clearStackNote(int8_t)’:
AcidStepSequencer.ino:155:30: error: ‘TRACK_NUMBER’ was not declared in this scope
AcidStepSequencer.ino:158:35: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:165:33: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino: In function ‘void ClockOut96PPQN(uint32_t*)’:
AcidStepSequencer.ino:180:28: error: ‘TRACK_NUMBER’ was not declared in this scope
AcidStepSequencer.ino:184:12: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino: In function ‘void setTrackChannel(uint8_t, uint8_t)’:
AcidStepSequencer.ino:221:10: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:59:43: note: in definition of macro ‘ATOMIC’
AcidStepSequencer.ino: In function ‘void initAcidStepSequencer(uint8_t)’:
AcidStepSequencer.ino:254:28: error: ‘TRACK_NUMBER’ was not declared in this scope
AcidStepSequencer.ino:256:5: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:258:42: error: ‘STEP_MAX_SIZE’ was not declared in this scope
HardwareInterface.ino: In function ‘void loadLastPattern()’:
HardwareInterface.ino:41:10: error: ‘class EEPROMClass’ has no member named ‘get’
HardwareInterface.ino: In function ‘void resetPattern(uint8_t)’:
HardwareInterface.ino:63:12: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:59:43: note: in definition of macro ‘ATOMIC’
HardwareInterface.ino:69:19: error: ‘struct SEQUENCER_TRACK_DATA’ has no member named ‘step’
HardwareInterface.ino:70:19: error: ‘struct SEQUENCER_TRACK_DATA’ has no member named ‘step’
HardwareInterface.ino:71:19: error: ‘struct SEQUENCER_TRACK_DATA’ has no member named ‘step’
HardwareInterface.ino:72:19: error: ‘struct SEQUENCER_TRACK_DATA’ has no member named ‘step’
HardwareInterface.ino: In function ‘void loadPattern(uint8_t)’:
HardwareInterface.ino:96:10: error: ‘class EEPROMClass’ has no member named ‘get’
HardwareInterface.ino:105:10: error: ‘class EEPROMClass’ has no member named ‘get’
HardwareInterface.ino:106:10: error: ‘class EEPROMClass’ has no member named ‘get’
HardwareInterface.ino:107:10: error: ‘class EEPROMClass’ has no member named ‘get’
HardwareInterface.ino:124:12: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:59:43: note: in definition of macro ‘ATOMIC’
HardwareInterface.ino:126:12: error: ‘class EEPROMClass’ has no member named ‘get’
HardwareInterface.ino: In function ‘void savePattern(uint8_t)’:
HardwareInterface.ino:162:34: error: ‘_sequencer’ was not declared in this scope
HardwareInterface.ino:163:12: error: ‘class EEPROMClass’ has no member named ‘put’
PageGenerative.ino: In function ‘void shiftSequence(int8_t)’:
PageGenerative.ino:19:19: error: ‘_sequencer’ was not declared in this scope
PageGenerative.ino: In function ‘void processGenerativePots()’:
PageGenerative.ino:91:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageGenerative.ino:97:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageGenerative.ino:107:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageGenerative.ino:120:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageGenerative.ino: In function ‘void acidRandomize()’:
PageGenerative.ino:145:10: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:59:43: note: in definition of macro ‘ATOMIC’
PageLive.ino: In function ‘void processControllerPots()’:
PageLive.ino:122:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageLive.ino:129:43: error: ‘_sequencer’ was not declared in this scope
PageLive.ino:134:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageLive.ino:141:43: error: ‘_sequencer’ was not declared in this scope
PageLive.ino:146:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageLive.ino:153:43: error: ‘_sequencer’ was not declared in this scope
PageLive.ino:161:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageLive.ino:163:14: error: ‘_sequencer’ was not declared in this scope
AcidStepSequencer.ino:59:43: note: in definition of macro ‘ATOMIC’
PageLive.ino:170:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PageSequencer.ino: In function ‘void sendPreviewNote(uint8_t)’:
PageSequencer.ino:14:23: error: ‘_sequencer’ was not declared in this scope
PageSequencer.ino:16:12: error: ‘_sequencer’ was not declared in this scope
PageSequencer.ino:18:34: error: ‘_sequencer’ was not declared in this scope
PageSequencer.ino: In function ‘void processSequencerPots()’:
PageSequencer.ino:37:48: error: ‘_sequencer’ was not declared in this scope
PageSequencer.ino:35:31: warning: unused variable ‘step_note’ [-Wunused-variable]
PageSequencer.ino: In function ‘void processSequencerButtons()’:
PageSequencer.ino:83:48: error: ‘_sequencer’ was not declared in this scope
PageSequencer.ino: In function ‘void processSequencerLeds()’:
PageSequencer.ino:133:48: error: ‘_sequencer’ was not declared in this scope
UserInterface.ino: In function ‘void processInterface()’:
UserInterface.ino:51:18: warning: unused variable ‘tempo’ [-Wunused-variable]
HardwareInterface.ino: In function ‘bool holded(uint8_t, uint8_t)’:
HardwareInterface.ino:248:1: warning: control reaches end of non-void function [-Wreturn-type]
In file included from AcidStepSequencer.ino:4:0:
uClock.h: At global scope:
uClock.h:48:3: warning: ‘umodular::clock::state’ defined but not used [-Wunused-variable]
} state;
^
uClock.h:53:3: warning: ‘umodular::clock::mode’ defined but not used [-Wunused-variable]
} mode;
^
any help needed thx

Please post your program and a link to the documentation for the library you are using.

...R

i am on arduino 2:1.0.5+dfsg2-4

this is the file i am trying to compile

// Acid StepSequencer, a Roland TB303 step sequencer engine clone
// author: midilab contact@midilab.co
// under MIT license
#include "uClock.h"

#define NOTE_STACK_SIZE 3

// MIDI clock, start, stop, note on and note off byte definitions - based on MIDI 1.0 Standards.
#define MIDI_CLOCK 0xF8
#define MIDI_START 0xFA
#define MIDI_STOP 0xFC
#define NOTE_ON 0x90
#define NOTE_OFF 0x80
#define MIDI_CC 0xB0

// sequencer data
typedef struct
{
uint8_t note;
int16_t length;
} STACK_NOTE_DATA;

typedef struct
{
uint8_t note:7;
uint8_t accent:1;
uint8_t glide:1;
uint8_t rest:1;
uint8_t reserved:6;
} SEQUENCER_STEP_DATA;
// 2 bytes per step

typedef struct
{
SEQUENCER_STEP_DATA step[STEP_MAX_SIZE];
int8_t step_init_point;
uint8_t step_length;
} SEQUENCER_TRACK_DATA;
// 32 bytes per 16 step + 2 bytes config = 34 bytes [STEP_MAX_SIZE=16]

typedef struct
{
SEQUENCER_TRACK_DATA data;
uint8_t step_location;
uint8_t channel;
bool mute;
STACK_NOTE_DATA stack[NOTE_STACK_SIZE];
} SEQUENCER_TRACK;

// main sequencer data is constantly change inside uClock 16PPQN and 96PPQN ISR callbacks, so volatile him!
SEQUENCER_TRACK volatile _sequencer[TRACK_NUMBER];

uint8_t _selected_track = 0;
uint8_t _selected_pattern = 0;

// make sure all above sequencer data are modified atomicly only
// eg. ATOMIC(_sequencer[track]data.step[0].accent = 1); ATOMIC(_sequencer[track].data.step_length = 7);
uint8_t _tmpSREG;
#define ATOMIC(X) _tmpSREG = SREG; cli(); X; SREG = _tmpSREG;

// shared data to be used for user interface interaction and feedback
bool _playing = false;
uint8_t _harmonize = 0;
uint16_t _step_edit = 0;
uint8_t _last_octave = 3;
uint8_t _last_note = 0;
int8_t _transpose = 0; // zero is centered C
uint8_t _selected_mode = 0;

void sendMidiMessage(uint8_t command, uint8_t byte1, uint8_t byte2, uint8_t channel, bool atomicly = false)
{
// send midi message
command = command | (uint8_t)channel;

// if we want to use it with MIDI_CC from non timmer compare ISR code then set it to true
if ( atomicly == true ) {
_tmpSREG = SREG;
cli();
}

Serial.write(command);
Serial.write(byte1);
Serial.write(byte2);

if ( atomicly == true ) {
SREG = _tmpSREG;
}
}

..........etc

uclock

/*!

  • @file uClock.cpp
  • Project BPM clock generator for Arduino
  • @brief A Library to implement BPM clock tick calls using hardware timer1 interruption. Tested on ATmega168/328, ATmega16u4/32u4 and ATmega2560.
  • Derived work from mididuino MidiClock class. (c) 2008 - 2011 - Manuel Odendahl - wesen@ruinwesen.com
  • @version 0.8
  • @author Romulo Silva
  • @date 10/06/17
  • @license MIT - (c) 2017 - Romulo Silva - contact@midilab.co
  • Permission is hereby granted, free of charge, to any person obtaining a
  • copy of this software and associated documentation files (the "Software"),
  • to deal in the Software without restriction, including without limitation
  • the rights to use, copy, modify, merge, publish, distribute, sublicense,
  • and/or sell copies of the Software, and to permit persons to whom the
  • Software is furnished to do so, subject to the following conditions:
  • The above copyright notice and this permission notice shall be included
  • in all copies or substantial portions of the Software.
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  • OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  • FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  • DEALINGS IN THE SOFTWARE.
    */

#ifndef U_CLOCK_H
#define U_CLOCK_H

#include <Arduino.h>
#include <inttypes.h>

#define PHASE_FACTOR 16

#define SECS_PER_MIN (60UL)
#define SECS_PER_HOUR (3600UL)
#define SECS_PER_DAY (SECS_PER_HOUR * 24L)

namespace umodular { namespace clock {

enum {
PAUSED = 0,
STARTING,
STARTED
} state;

enum {
INTERNAL_CLOCK = 0,
EXTERNAL_CLOCK
} mode;

class uClockClass {

private:

... etc.....

If your program is too long for a single Post then post your .ino file as an attachment.

And for programs that are short enough to fit in a Post please use the code button </>
codeButton.png

so your code 
looks like this

and is easy to copy to a text editor See How to use the forum

Also (in either case) please use the AutoFormat tool to indent your code for easier reading.

...R

ok thanks for the info i managed a copy and paste with the above texts.

there is no documentation!
but i think i should use the main largest file ino,
its called audacino.ino
which i am guessing is the first file to compile and it will call the other files

// Acid StepSequencer, a Roland TB303 step sequencer engine clone
// author: midilab contact@midilab.co
// under MIT license
#include <Arduino.h>

#include "config.h"

void setup() 
{
  // AcidStepSequencer Interface
  initAcidStepSequencer(MIDI_MODE);
  setTrackChannel(1, TRACK1_CHANNEL);
  setTrackChannel(2, TRACK2_CHANNEL);

  // pins, buttons, leds and pots config
  configureInterface();

  // last pattern user had load before power off
  loadLastPattern();
}

// User interaction goes here
void loop() 
{
  processInterface();
}

but still getting the same error

uClock.h:48:3: warning: anonymous type with no linkage used to declare variable 'umodular::clock:: umodular::clock::state' with linkage
} state;
^
uClock.h:53:3: warning: anonymous type with no linkage used to declare variable 'umodular::clock:: umodular::clock::mode' with linkage
} mode;
^

aciduino-master.zip (309 KB)