0

MakeCode Tutorials and Sound Broken
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MakeCode Tutorials and Sound Broken

by b_bininger on Tue May 07, 2019 1:10 pm

I have been using the Circuit Playground Express (CPE) for the past month with my 5th graders. I have 28 CPE's that are being used 4 days each week. We noticed a change in the tutorials last week as well as an issue when adding sound and then downloading it to the CPE.

The Button Flipper tutorial no longer has Sound options even though the tutorial tells you to use sound. I feel like another one of the tutorials lost the sound options as well, but can't remember which one it is at this time.

We've also noticed that when you download your code to the CPE that the sound no longer sounds clear, but very low and gritty/scratchy.

I've tried in both Chrome and IE as well as our outdated Windows 7 machines and a Chromebook. This worked just fine up until last week.

Anyone know what could have happened? The sound is very frustrating as I was starting a collaboration project with the art teacher.

Billie

b_bininger
 
Posts: 2
Joined: Tue May 07, 2019 12:57 pm

Re: MakeCode Tutorials and Sound Broken

by johnpark on Wed May 08, 2019 2:02 pm

Sorry to hear it. Out of curiosity, do you hear the same results if you use https://makecode.adafruit.com/beta instead of the regular, release version?

johnpark
 
Posts: 613
Joined: Wed Mar 25, 2009 2:15 pm

Re: MakeCode Tutorials and Sound Broken

by AJ06 on Wed May 15, 2019 5:46 pm

Hi Billie,
I don't have a solution to your sound problem with CPX. Only just got one myself and I cannot get a clean sound output (the output waveform on pin A0 is sawtooth not a sine wave). I think you must be way in front of me using CPX. Do you think we should be able to produce a simple note melody using CPX with makecode?

Alan

AJ06
 
Posts: 3
Joined: Wed May 15, 2019 4:38 am

Re: MakeCode Tutorials and Sound Broken

by b_bininger on Thu May 16, 2019 8:24 am

I had reached out to Microsoft several days before posting this. They finally replied to me the other day.

"We did indeed release a new version of Circuit Playground Express recently, and have heard about these sound quality issues. We updated some of our Sound API’s which has caused this issue. Our engineers are working to resolve right now. Hopefully we’ll have a fix out soon.

Our technical writer will go through and make sure the Tutorials all have the correct blocks showing – thanks for pointing that out."

b_bininger
 
Posts: 2
Joined: Tue May 07, 2019 12:57 pm

Re: MakeCode Tutorials and Sound Broken

by kevinjwalters on Thu May 16, 2019 12:33 pm

AJ06 wrote:I don't have a solution to your sound problem with CPX. Only just got one myself and I cannot get a clean sound output (the output waveform on pin A0 is sawtooth not a sine wave).


Do you mean sawtooth or triangle? I had a look yesterday and it was a triangle. I thought the sound had changed but it's been a while since I MakeCoded and I assumed I was imagining that. Interesting to see that confirmation on audio changes!

kevinjwalters
 
Posts: 461
Joined: Sun Oct 01, 2017 3:15 pm

Re: MakeCode Tutorials and Sound Broken

by kevinjwalters on Wed May 22, 2019 1:04 pm

Any word from Microsoft on this? Did they provide anyway to use the previous/older version of the MakeCode IDE in the interim?

kevinjwalters
 
Posts: 461
Joined: Sun Oct 01, 2017 3:15 pm

Re: MakeCode Tutorials and Sound Broken

by Colette on Wed May 22, 2019 3:31 pm

Hello Microsoft,

Have you found a solution to the sound problem? My students' project is due in June and they will have to present it to their parents on June 6th. We would really appreciate your help with this matter.

When they downloaded their last program, they have lost the quality and the volume of their sounds.

Thankyou,

Colette
 
Posts: 3
Joined: Sun May 19, 2019 9:41 am

Re: MakeCode Tutorials and Sound Broken

by AJ06 on Sun May 26, 2019 2:37 pm

Hi Colette
Wish I had a solution to the audio output problem with CPE. l to have a very similar fault, probably the same fault ! The output on pin A0 is a triangle or sawtooth waveform and not a pure tone and as such sounds terrible and there is no chance of composing a melody in code. This only happens with microsoft makecode ie the block code similar to MIT scratch.
Noticed that Microsoft are doing something with this.
Could not see what the point is dragging notes such as middle C from a simulated piano keyboard on screen into makecode only to find the notes are not proper musical tones.

None of this problem exists with Circuitpython tone ouput is fine but of course Python is text based editor based and not as easy to get the hang of as using block code.

Alan

AJ06
 
Posts: 3
Joined: Wed May 15, 2019 4:38 am

Re: MakeCode Tutorials and Sound Broken

by kevinjwalters on Mon May 27, 2019 7:43 pm

I couldn't think of a MakeCode workaround/hack in the interim while Microsoft deal with this. BUT if you have multiple CPXs then you could connect CPX1 running MakeCode to CPX2 running a CircuitPython program to make the beeps. I just wrote cpx-basic-cv-synth.py which does the latter part of that. This is the connectivity it needs, modelled on CV/gate signals used by modular synthesizers:

  • CPX1 GND to CPX2 GND (black wire)
  • CPX1 A0 to CPX2 A7 (analogue control voltage)
  • CPX1 A1 to CPX2 A6 (digital gate)

You can then play a tune in MakeCode by setting a voltage on A0 analogue output (0,0V is C3, 1.0V is C4 (middle C), etc) and bringing the A1 digital output high for the duration of the note. I might have time to provide an example of that in next few days...

(My CircuitPython code has a few leftovers in it as it's based on code I developed for Adafruit Learn: Circuit Playground Express USB MIDI Controller and Synthesizer.)

kevinjwalters
 
Posts: 461
Joined: Sun Oct 01, 2017 3:15 pm

Re: MakeCode Tutorials and Sound Broken

by kevinjwalters on Tue May 28, 2019 2:00 pm

Unfortunately my two CPX board workaround appears not to be viable at the moment as analog write does not appear to work to pad A0. I've filed a bug report for this after mentioning it in Discord, analog write errors on Circuit Playground Express A0 (true analogue) #1061.

kevinjwalters
 
Posts: 461
Joined: Sun Oct 01, 2017 3:15 pm

Re: MakeCode Tutorials and Sound Broken

by johnpark on Fri May 31, 2019 4:42 pm

Looking into this as well. I'm curious if there's a way to download the standalone MakeCode app (.exe) for Windows, particularly older versions and essentially downgrade to a time before these changes broke the sound output of Play Tone blocks. (Seems the Play Sound blocks still work fine).

johnpark
 
Posts: 613
Joined: Wed Mar 25, 2009 2:15 pm

Re: MakeCode Tutorials and Sound Broken

by johnpark on Fri May 31, 2019 4:58 pm

UPDATED UPDATE: there's a way to roll back time to an earlier version of MakeCode in the browser. A little bird at MSFT told me. https://makecode.adafruit.com/v1.1.46 that will get you back to v1.1.46 which I've just confirmed has Play Tone working nicely. That's the last version before Tone gets very quiet in my tests.

johnpark
 
Posts: 613
Joined: Wed Mar 25, 2009 2:15 pm

Please be positive and constructive with your questions and comments.