Unicode Decode Error with audio in psychopy experiment - audio

I have the following problem:
I have experiments that ran on a computer with the PsychoPy Version 1.83.04.
Due to some problems, the computer was reconfigured, hence also PsychPy updated to Version 1.85.4. Since then, none of my experiments with a sound included work anymore. The error message is as follows:
Following an advice in another forum, I changed the files of
- psychopy/sound/init.py
- psychopy/sound/backend_pyo.py
(as suggested also in here).
But unfortunately, this did not work neither. I get a new error message that is
I also tried with the old PsychoPy-Version 1.83.04 - here the experiment at least starts before breaking down. The error message then states that the lxml version is too old to be used with openpyxl and hence cannot open the xlsx-condition file. But there seems to be no problem with the sound device with the old version.
My sound device is as follows:
Description: Lautsprecher (Realtek High Definition Audio)
Default Sound Playback: Yes
Default Voice Playback: Yes
Hardware ID:
HDAUDIO\FUNC_01&VEN_10EC&DEV_0671&SUBSYS_173411EB&REV_1000
Manufacturer ID: 1
Product ID: 100
Type: WDM Driver
Name:
RTKVHD64.sys
Driver Version: 6.00.0001.8186 (English) Driver
Attributes: Final Retail WHQL
Logo'd: Yes
Date and Size: 6/29/2017
18:52:00, 5826560 bytes
What else can I try?
Thank you for your help.

I finally managed to solve the problem - at least superficially.
Following this advice I set PsychoPy back to version 1.85.2. But then, the experiment crushed with a "Fatal Python error: (pygame parachute)..." error message.
Finally, I found the hint where to "switch off" pyo (it was found here): in PsychoPy in File -> Preferences and then delte pyo from the audio library.
Now, my experiments are running again.

Related

REDHAWK-SDR unable to play audio via python using SoundSink

Attempting to play a signal through computer speakers via python so I tried the example in 7.1 of the manual. I see the signal on the plot but hear nothing over the speakers. Is SoundSink the wrong approach for this? I'm running REDHAWK 2.0.6 on CentOS 7. In case this is important, the first time sb.start() is called, "shared memfd open() failed: Invalid argument" is displayed. When called a second time that message doesn't appear. I am able to play audio from within the REDHAWK IDE.
from ossie.utils import sb
import frontend
sim = sb.launch("rh.FmRdsSimulator")
demod=sb.launch("rh.AmFmPmBasebandDemod")
filter=sb.launch("rh.fastfilter")
resample=sb.launch("rh.ArbitraryRateResampler")
agc=sb.launch("rh.agc")
sink=sb.SoundSink()
plot=sb.Plot()
sim.connect(demod)
demod.connect(filter, usesPortName="fm_dataFloat_out")
filter.connect(resample)
resample.connect(agc)
agc.connect(sink)
agc.connect(plot)
sim.addAWGN=False
demod.freqDeviation=15000.0
filter.filterProps.freq1=16000.0
filter.filterProps.Ripple=0.5
filter.filterProps.Type="lowpass"
resample.outputRate=32000.0
sb.start()
alloc = frontend.createTunerAllocation(
"RX_DIGITIZER",
allocation_id="testing",
center_frequency=100.1e6,
sample_rate=256e3,
sample_rate_tolerance=20.0)
sim.allocateCapacity(alloc)
The package that SoundSink uses to generate sound has been deprecated in CentOS 7 (but is still available in CentOS 6). This issue has been added to the backlog and will be fixed in a future release.

Euterpea Exception: No MIDI output device found

I am trying to get started using Haskell's Euterpea library. My first goal was to get it to play a given sound file (e.g. mp3 or wav), but first I ran into an issue following instructions to get it to just play a simple note sound in ghci.
Following the "Setting up MIDI" instructions at Euterpea's web page, I ran
import Euterpea
play $ c 4 qn
in ghci. The 'play' command resulted in the following error message:
Prelude Euterpea> play $ c 4 qn
*** Exception: No MIDI output device found
CallStack (from HasCallStack):
error, called at ./Euterpea/IO/MIDI/MidiIO.lhs:122:18 in Euterpea-2.0.2-Iz37iWlkpjn2emP4FnvOI1:Euterpea.IO.MIDI.MidiIO
I thought I needed to specify midi output to my machine (macOS Sierra) and found an application called 'Audio MIDI Setup', but it showed that a midi output (my internal speakers) was already specified.
Anyone know what this issue is or how to fix it?
Perhaps you solved this, but for posterity some ideas:
Sounds like you didn't install and run a MIDI synth (e.g. SimpleSynth) first. AFAICT, Audio MIDI Setup doesn't actually include a software synthesizer, it's more for advanced / hardware MIDI setup.
This should create the MIDI output devices that Euterpea couldn't find there. You may also need to play around with channels (e.g. use playDev n instead of play and work out a value for n from your device list... or even just try 1 through 8)
Either way there's some good Mac-focussed help on Donya's working with MIDI on Mac OS X page. Hope that helps.

How to build and run Light Table without error?

I've been trying for hours, but can't build and use Light Table. Every time I try to run deploy/LightTable, it hangs on a screen that simply says "Light Table". I receive this error*:
[14381:0519/204037:INFO:CONSOLE(27860)] "Uncaught TypeError: Cannot read property 'thread_STAR_' of undefined", source: file:///home/zaz/Desktop/LightTable/builds/lighttable-0.8.0-linux/resources/app/core/node_modules/lighttable/bootstrap.js (27860)
Here's what I've tried:
git clone https://github.com/LightTable/LightTable.git
cd LightTable
bash linux_deps.sh
./deploy/LightTable # creates frozen window, throws the error above
cd deploy
./LightTable # creates frozen window, throws the error above
./ltbin # creates frozen window, throws the error above
I also tried similar things after checking out the atom-shell branch and the 0.7.2 tag (and cleaning up all the files from the previous build). Each time, I received the error above.
Does anyone know what's going on here?
Has Light Table been completely abandoned? It seems the last commit was in March.
* Depending on the version I was trying to run, I also received other errors, but I don't think they're relevant (the error above was the only one that appeared for all versions):
[18593:0519/222845:INFO:gpu_info_collector_x11.cc(80)] NVCtrl extension does not exist.
[18593:0519/222845:ERROR:browser_main_loop.cc(226)] Gdk: gdk_window_set_icon_list: icons too large
Fontconfig warning: FcPattern object size does not accept value 11(i)
[14413:0519/204035:INFO:renderer_main.cc(212)] Renderer process started
A year later (question was written in May 2015, now is June 2016), LightTable 0.8.1 is out, and I tried both Linux binary and cloned it from git, and it works fine.
For complete info, I'm using also Atom, and although I had not problems with "Cannot read property 'something' of undefined"" in Atom core, I met such problems in two or three Atom packages.
Both editors are based on same electron platform, LightTable is beautiful eye candy with quite revolutionary REPL integration, but it needs more polish to be usable to same extent as Atom.
For example, LightTable does not have workspace saving by default, that is done via plugin. That's ridiculous.
But although Atom looks so nice and powerful compared to simple editors, with realy huuuge number of available packages/plugins, LightTable is more elegant.
As I don't want to start new semi-religious war Atom vs LightTable resembling vi-vs-emacs, I'll stop here. :)
I can't replicate your problems in LightTable v0.8.1, so I think that answers this question. If not, please add errors you get with v0.8.1.
For info about releases, please check: https://github.com/LightTable/LightTable/releases

Unity 5.0: Sprite.Create error message "!hasError"

I came back to a Unity game that I was working on a couple of weeks ago, using version 4.6.1. After upgrading to version 5.0 and converting the project, there was an error in the following line:
Sprite.Create(plusTexture, Rect(toRightBoundry, 0, plusTexture.width, plusTexture.height), rightPos);
The image is imported as a single Sprite , 150 pixels per unit, pivoted at the center, using a bilinear filter. The import mode is compression , with a max size of 1024. Given those conditions and the fact that this piece of code was not altered since the working version and also after confirming that all values passed are valid, the following error is found at runtime:
"!hasError"
I have researched in the forums and cannot find a solution for this, mostly topics that end in the developers asking for a bug report. Is anyone familiar with how to solve this issue ?
Thanks in advance and have a nice day
it looks like an error do to unresolved merge conflicts from sprite atlas meta file of the resource file. We were getting a few funny named errors lie"aabb is not define" "!hasError" and something WIPPE. On of them was due to artist not resolving conflicts on a mesh meta file

Node-Webkit read MP3 files

I use the audio class to read MP3 file thanks to a little trick : replacing the ffmpegsumo.so of Node-Webkit with the chromium one. This enable the reading of MP3 on Windows but doesn't works on Mac OS. Does anyone know why ?
Here's the code :
player = new Audio()
player.src = '/path/to/the/audio.mp3';
player.play();
This seems to be dependant upon the dll/so being a 32 bit version. I am guessing that is why copying the file from Chrome doesn't work correctly for most people ( my 3 year old phone is the only 32-bit device I have left ).
I keep seeing this link --
https://github.com/rogerwang/node-webkit/wiki/Support-mp3-and-h264-in-video-and-audio-tag
.. but it is a blank page. I am guessing it was deleted since the info was likely not current or correct.
This issue thread has links to some rebuilt ffmpegsumo libraries for both Mac and Windows --
https://github.com/rogerwang/node-webkit/issues/1423
The alternative appears to be rebuilding ffmpegsumo, this thread has some config for doing that -- https://github.com/rogerwang/node-webkit/issues/1208
I am still confused about the licensing on it after you build the library, so that is probably worth some research. Everything about mpeg4-part10 is copyrighted and heavily patent encumbered. I think we all need to get smart enough to stop using mp4/h.264. Before I got this working correctly on node-webkit, it was easier to use ffmpeg to transcode the video to an ogv container using Theora and Vorbis codecs. At this point it seems like iOS is keeping h.264 alive, when it should probably die the horrible death it has earned.

Resources