4 channel polyphonic tone generator (blue pill)

Post your cool example code here.
ChrisMicro
Posts: 308
Joined: Fri Mar 24, 2017 4:51 pm
Location: Germany

Re: 4 channel polyphonic tone generator (blue pill)

Post by ChrisMicro » Mon Nov 13, 2017 9:38 pm

>But does it have only 1 output?

Yes, the signals are "analog" like waveforms and are added internally.

It is done here ( line 277 ).

User avatar
zoomx
Posts: 528
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: 4 channel polyphonic tone generator (blue pill)

Post by zoomx » Tue Nov 14, 2017 10:28 am

Uhmmm..... streaming.h is missing.

Code: Select all

sketch\TimerTone.h:3:23: fatal error: Streaming.h: No such file or directory
Is it that one?

Code: Select all

Streaming.h - Arduino library for supporting the << streaming operator
  Copyright (c) 2010-2012 Mikal Hart.  All rights reserved.
Did "Arduino language" still need it?

Edit: yes it need it!

Edit2: I added that streaming.h and got this error

Code: Select all

Arduino: 1.8.4 (Windows 7), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STM32duino bootloader, 72Mhz (Normal)"

sketch\TimerTone.cpp: In function 'uint8_t toneSetup(const uint8_t*, uint8_t)':

TimerTone.cpp:220: error: 'systick_attach_callback' was not declared in this scope
Edit3: maybe my core is old
viewtopic.php?t=2117

stevestrong
Posts: 1749
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: 4 channel polyphonic tone generator (blue pill)

Post by stevestrong » Tue Nov 14, 2017 10:54 am

Sorry, I should have mention it, it is about ArduinoStreaming lib, you can get it from here
https://github.com/geneReeves/ArduinoSt ... treaming.h
or here (first attachment) http://stm32duino.com/viewtopic.php?f=9&t=2425

Funny, I don't get any warning/error. Are you using the TonePlayer example from the example folder of the lib?
Did you unpack the files under Arduino/libraries ?
How old is your repo? You should update it, I always update it at least once weekly.

Maybe update the IDE to 1.8.5.

User avatar
zoomx
Posts: 528
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: 4 channel polyphonic tone generator (blue pill)

Post by zoomx » Tue Nov 14, 2017 11:14 am

Your streaming.h is a little newer than mine but, after updating core (I found it was very old, March 2017!), I got it compiled.
Anyway I updated streaming.h.

Now I have to search for the hardware!

Thanks!

User avatar
Vassilis
Posts: 320
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: 4 channel polyphonic tone generator (blue pill)

Post by Vassilis » Tue Nov 14, 2017 6:18 pm

Well done Steve, I like it !

Post Reply