электронная музыка, библиотека Mozzi

mrWang
Offline
Зарегистрирован: 19.03.2017

Пытаюсь повторить проект https://habr.com/ru/company/skillfactory/blog/542858/

Скачал код библиотеки с гитхаба https://github.com/sensorium/Mozzi

код программы  https://github.com/techno-womble/Audiophonic-Workbench/blob/main/APW-Sketch.ino

 

//  AudioPhonic WorkBench Sketch. 
// 
//  Simulate three vintage style test oscillators
//  with amplitude and frequency cross modulation
//
//   *************************************** IMPORTANT ***********************************************
//
//   This sketch requires mozzi_config.h to be
//   be changed from STANDARD mode to HIFI.
//
//   In mozzi_config.h,
//   change
//       //#define AUDIO_MODE STANDARD
//       #define AUDIO_MODE STANDARD_PLUS
//       //#define AUDIO_MODE HIFI
//   to
//       //#define AUDIO_MODE STANDARD
//       //#define AUDIO_MODE STANDARD_PLUS
//       #define AUDIO_MODE HIFI
//
//  John Potter (technoWomble), 2021 CC by-nc-sa.
//

#include <MozziGuts.h>
#include <Oscil.h> 
#include <tables/sin2048_int8.h>    

#define AUDIO_RATE 32768
#define CONTROL_RATE 128

Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> osc1(SIN2048_DATA);  
Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> osc2(SIN2048_DATA);  
Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> osc3(SIN2048_DATA);

const int vr1Pin = A0;
const int vr2Pin = A1;
const int vr3Pin = A2;
const int vr4Pin = A3;
const int vr5Pin = A4;
const int vr6Pin = A5;
const int vr7Pin = A6;
const int vr8Pin = A7;

const int sw1Pin = 2;
const int sw2Pin = 3;

int osc1Freq;
int osc2Freq;
int osc3Freq;

int osc1Level;
int osc2Level;
int osc3Level;

int osc2FMVal;
int osc3FMVal;
 
int osc2AMVal;
int osc3AMVal; 

void setup(){
  pinMode(sw1Pin, INPUT_PULLUP); 
  pinMode(sw2Pin, INPUT_PULLUP); 
  startMozzi(CONTROL_RATE); 
  osc1.setPhase(random(2047));                            // don't want the oscillators locked in phase
  osc2.setPhase(random(2047));
  osc3.setPhase(random(2047)); 
}

void updateControl(){
  osc2FMVal = 0;
  osc3FMVal = 0;
  osc2AMVal = 0;
  osc3AMVal = 0;
  
  osc1Freq = ((mozziAnalogRead (vr1Pin)) << 3) + 128;      // Osc1 Pitch, 
  osc2Freq = ((mozziAnalogRead (vr2Pin)) << 3) + 128;      // Osc2 Pitch    
  osc3Freq = ((mozziAnalogRead (vr3Pin)) << 3) + 128;      // Osc3 Pitch    

  osc1Level = mozziAnalogRead(vr4Pin) >> 2;                // Osc1 Volume, 0 - 255        
  osc2Level = mozziAnalogRead(vr5Pin) >> 2;                // Osc2 Volume
  osc3Level = mozziAnalogRead(vr6Pin) >> 2;                // Osc3 Volume
  
  int pot7Val = mozziAnalogRead(vr7Pin);                   // OSC2 MODULATION    
  if (pot7Val <= 512) {osc2FMVal = (512 - pot7Val);} else  // Osc2 FM amount, 0 to 511 
                      {osc2AMVal = (pot7Val- 512) >> 2 ;}  // Osc2 AM amount, 0 to 127                                                                             

  int pot8Val = mozziAnalogRead(vr8Pin);                   // OSC3 MODULATION
  if (pot8Val <= 512) {osc3FMVal = (512 - pot8Val);} else  // Osc3 FM amount, 0 to 511  
                      {osc3AMVal = (pot8Val- 512) >> 2;}   // Osc3 AM amount, 0 to 127             
   
  if (digitalRead(sw1Pin)==0) {osc1Freq = osc1Freq >> 7;}  // Osc1 high/low rate switch  
  if (digitalRead(sw2Pin)==0) {osc2Freq = osc2Freq >> 7;}  // Osc2 high/low rate switch  

  osc1Freq = constrain(osc1Freq,1,8194);
  osc1.setFreq(osc1Freq); 
}

int updateAudio(){
  int osc1Val = osc1.next();

  int osc2ModulatedFreq = (osc2Freq + ((osc1Val ) * (osc2FMVal >> 4)));        // calculate Osc2 FM           
  osc2ModulatedFreq = constrain(osc2ModulatedFreq,1,8194);
  osc2.setFreq(osc2ModulatedFreq); 

  int osc2Val = osc2.next();
  
  int osc2Trem = (osc1Val + 128L);                                              // calculate Osc2 AM    
  osc2Trem = 255 - ((osc2Trem * osc2AMVal) >> 7) ;
  osc2Val = (osc2Val * osc2Trem) >> 8;
  
  int osc3ModulatedFreq = (osc3Freq + ((osc2Val ) * (osc3FMVal >> 4)));        // calculate Osc3 FM                        
  osc3ModulatedFreq = constrain(osc3ModulatedFreq,1,8194);        
  osc3.setFreq(osc3ModulatedFreq);  

  int osc3Val = osc3.next(); 
 
  int osc3Trem = (osc2Val + 128);                                              // calculate Osc2 AM  
  osc3Trem = 255 - ((osc3Trem * osc3AMVal) >> 7) ;
  osc3Val = (osc3Val * osc3Trem) >> 8;

  int osc1Out = (osc1Val * osc1Level) >> 3;
  int osc2Out = (osc2Val * osc2Level) >> 3;                                    // set each oscillator volume                        
  int osc3Out = (osc3Val * osc3Level) >> 3;
    
  return (osc1Out + osc2Out + osc3Out) >> 1;                                  // mix and output                 
}

void loop(){
  audioHook();                                                                 // required according to Mozzi docs
}

однако после замены в библиотеки кода с

//#define AUDIO_MODE STANDARD
#define AUDIO_MODE STANDARD_PLUS
//#define AUDIO_MODE HIFI

на

//#define AUDIO_MODE STANDARD
//#define AUDIO_MODE STANDARD_PLUS
#define AUDIO_MODE HIFI

скетч перестает компилироваться и вываливается куча ошибок

In file included from E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/MozziGuts.h:210:0,
                 from E:\!Main Folder\PROJECT\Arduino\Mozzi\Audiophonic-Workbench-main\APW-Sketch\APW-Sketch.ino:24:
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static StereoOutput StereoOutput::fromNBit(uint8_t, int16_t, int16_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:100:97: note: in expansion of macro 'SCALE_AUDIO'
   static inline StereoOutput fromNBit(uint8_t bits, int16_t l, int16_t r) { return StereoOutput(SCALE_AUDIO(l, bits), SCALE_AUDIO(r, bits)); }
                                                                                                 ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:100:97: note: in expansion of macro 'SCALE_AUDIO'
   static inline StereoOutput fromNBit(uint8_t bits, int16_t l, int16_t r) { return StereoOutput(SCALE_AUDIO(l, bits), SCALE_AUDIO(r, bits)); }
                                                                                                 ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static StereoOutput StereoOutput::fromNBit(uint8_t, int32_t, int32_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:102:97: note: in expansion of macro 'SCALE_AUDIO'
   static inline StereoOutput fromNBit(uint8_t bits, int32_t l, int32_t r) { return StereoOutput(SCALE_AUDIO(l, bits), SCALE_AUDIO(r, bits)); }
                                                                                                 ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:102:97: note: in expansion of macro 'SCALE_AUDIO'
   static inline StereoOutput fromNBit(uint8_t bits, int32_t l, int32_t r) { return StereoOutput(SCALE_AUDIO(l, bits), SCALE_AUDIO(r, bits)); }
                                                                                                 ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static StereoOutput StereoOutput::fromAlmostNBit(uint8_t, int16_t, int16_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:108:103: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline StereoOutput fromAlmostNBit(uint8_t bits, int16_t l, int16_t r) { return StereoOutput(SCALE_AUDIO_NEAR(l, bits), SCALE_AUDIO_NEAR(r, bits)); }
                                                                                                       ^~~~~~~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:108:103: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline StereoOutput fromAlmostNBit(uint8_t bits, int16_t l, int16_t r) { return StereoOutput(SCALE_AUDIO_NEAR(l, bits), SCALE_AUDIO_NEAR(r, bits)); }
                                                                                                       ^~~~~~~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static StereoOutput StereoOutput::fromAlmostNBit(uint8_t, int32_t, int32_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:110:103: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline StereoOutput fromAlmostNBit(uint8_t bits, int32_t l, int32_t r) { return StereoOutput(SCALE_AUDIO_NEAR(l, bits), SCALE_AUDIO_NEAR(r, bits)); }
                                                                                                       ^~~~~~~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:110:103: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline StereoOutput fromAlmostNBit(uint8_t bits, int32_t l, int32_t r) { return StereoOutput(SCALE_AUDIO_NEAR(l, bits), SCALE_AUDIO_NEAR(r, bits)); }
                                                                                                       ^~~~~~~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static MonoOutput MonoOutput::fromNBit(uint8_t, int16_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:149:82: note: in expansion of macro 'SCALE_AUDIO'
   static inline MonoOutput fromNBit(uint8_t bits, int16_t l) { return MonoOutput(SCALE_AUDIO(l, bits)); }
                                                                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:149:82: note: in expansion of macro 'SCALE_AUDIO'
   static inline MonoOutput fromNBit(uint8_t bits, int16_t l) { return MonoOutput(SCALE_AUDIO(l, bits)); }
                                                                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static MonoOutput MonoOutput::fromNBit(uint8_t, int32_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:151:82: note: in expansion of macro 'SCALE_AUDIO'
   static inline MonoOutput fromNBit(uint8_t bits, int32_t l) { return MonoOutput(SCALE_AUDIO(l, bits)); }
                                                                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:151:82: note: in expansion of macro 'SCALE_AUDIO'
   static inline MonoOutput fromNBit(uint8_t bits, int32_t l) { return MonoOutput(SCALE_AUDIO(l, bits)); }
                                                                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static MonoOutput MonoOutput::fromAlmostNBit(uint8_t, int16_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:165:88: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline MonoOutput fromAlmostNBit(uint8_t bits, int16_t l) { return MonoOutput(SCALE_AUDIO_NEAR(l, bits)); }
                                                                                        ^~~~~~~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:165:88: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline MonoOutput fromAlmostNBit(uint8_t bits, int16_t l) { return MonoOutput(SCALE_AUDIO_NEAR(l, bits)); }
                                                                                        ^~~~~~~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h: In static member function 'static MonoOutput MonoOutput::fromAlmostNBit(uint8_t, int32_t)':
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: error: 'AUDIO_BITS' was not declared in this scope
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:167:88: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline MonoOutput fromAlmostNBit(uint8_t bits, int32_t l) { return MonoOutput(SCALE_AUDIO_NEAR(l, bits)); }
                                                                                        ^~~~~~~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:48:37: note: suggested alternative: 'AUDIO_BIAS'
 #define SCALE_AUDIO(x,bits) (bits > AUDIO_BITS ? (x) >> (bits - AUDIO_BITS) : (x) << (AUDIO_BITS - bits))
                                     ^
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:49:34: note: in expansion of macro 'SCALE_AUDIO'
 #define SCALE_AUDIO_NEAR(x,bits) SCALE_AUDIO(x,bits)
                                  ^~~~~~~~~~~
E:\!Main Folder\PROJECT\Arduino Lib\libraries\Mozzi-master/AudioOutput.h:167:88: note: in expansion of macro 'SCALE_AUDIO_NEAR'
   static inline MonoOutput fromAlmostNBit(uint8_t bits, int32_t l) { return MonoOutput(SCALE_AUDIO_NEAR(l, bits)); }
                                                                                        ^~~~~~~~~~~~~~~~
exit status 1
Ошибка компиляции для платы Arduino Pro or Pro Mini.

может кто нибудь у себя закомпилить, и/или подсказать где ошибка кроется. поиск на форуме библиотеки не дал результата

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

А с какой целью в библиотечный код вносились изменения?

mrWang
Offline
Зарегистрирован: 19.03.2017

автор проекта, да и описание библиотеки содержит сведения, что возможно увеличить качество звука, для этого нужно одно раскомментировать другое закоментировать

 

AUDIO_MODE holds the audio mode setting.
Select STANDARD (deprecated), STANDARD_PLUS or HIFI audio output mode in the Mozzi/mozzi_config.h file with
\#define AUDIO_MODE STANDARD_PLUS or \#define AUDIO_MODE HIFI.
In Mozzi/config.h, comment one of these options in and the others out to set the audio mode.

In STANDARD_PLUS mode the sample resolution is 488,
which provides some headroom above the 8 bit table resolution currently used by
the oscillators. You can look at utility/TimerOne library for more info about how
interrupt rate and pwm resolution relate.

HIFI audio mode enables much higher quality output by combining signals from pins 9 and 10.
For HIFI mode, edit Mozzi/mozzi_config.h to contain \#define AUDIO_MODE HIFI,
and comment out \#define AUDIO_MODE STANDARD and \#define AUDIO_MODE STANDARD_PLUS.

@note Teensy 3.* plays 12 bit audio in STANDARD or STANDARD_PLUS modes, and has no HIFI mode.
*/
//#define AUDIO_MODE STANDARD
//#define AUDIO_MODE STANDARD_PLUS

#define AUDIO_MODE HIFI

 

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

Ну, в принципе, логично: если звук по качеству ниже всякой критики, то существенно улучшить его можно, полностью отключив.

Посмотрел я на список файлов библиотеки, их возраст составляет от 6 лет до менее месяца, т.е. библиотека интенсивно модифицируется. Вполне вероятно, та версия, что скачана Вами, сильно отличается от версии, скачанной techno-womble (автором скетча) . 

Кстати, загляните к автору:

1. Он, похоже, отвечает на заданные вопросы (последний ответ 5 дней назад).

2. Вопрос относительно некомпилируемости библиотеки после изменений ему уже задали (правда, он еще не успел на него ответить).

mrWang
Offline
Зарегистрирован: 19.03.2017

тут дело однозначно в библиотеке, в коде скетча можно все строки закомментировать кроме вызова библиотеки и все равно ошибки сыпит

andriano
andriano аватар
Offline
Зарегистрирован: 20.06.2015

mrWang пишет:

тут дело однозначно в библиотеке

Разве с этим кто-то спорит?