TwoToneDetect TwoToneDetect on a Raspberry Pi - How To

Status
Not open for further replies.

aliby19

Member
Feed Provider
Joined
Mar 10, 2005
Messages
147
Reaction score
6
Location
Indianapolis, IN
Has anyone noticed an issue with low frequency tones not being detected? I have a couple departments that use tones lower than 400, and they don't seem to get detected.

Any thoughts?
 

davidVT

Member
Feed Provider
Joined
Aug 29, 2010
Messages
138
Reaction score
7
Location
Washington County,Vermont
I found low freq tones need more input volume. Since increasing my input volume and using a better antenna (to pull the audio out of the weeds) that my low tones are working well.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
I found low freq tones need more input volume. Since increasing my input volume and using a better antenna (to pull the audio out of the weeds) that my low tones are working well.
I agree with Dave, the low ones are a little more challenging. some volume helps. I have several in the range of 313-330 and it detects them reliably.
 

davidVT

Member
Feed Provider
Joined
Aug 29, 2010
Messages
138
Reaction score
7
Location
Washington County,Vermont
Jim
I have been thinking about the multiple radio / sound card question.
At $35 should it just be one slice of PI per radio?
I think I will try one of my cheap SDR USB as a radio input for my 2nd PI. maybe that will remove the sound card completely???
David
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
Low freq tones

Has anyone noticed an issue with low frequency tones not being detected? I have a couple departments that use tones lower than 400, and they don't seem to get detected.

Any thoughts?

Also remember with the low freq's the spread of your tone tolerance will be less. 1% of a 313 hz tone is only 3 hz wheras 1% of a 1600 tone is 16. +\- 3 equals a spread of 6 hz wheras +\-16 equals a spread of 32 hz. So the lower freq's need to be spot on.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
Running TTD and. Feed concurrently from a pi

I think I have streaming audio working alongside TTD on a Pi. Haven't had any pages yet to know that everything is working 100%, but it appears ok. I followed the instructions here to get the streaming audio going (installing darkice and icecast):

Live mp3 streaming from audio-in with DarkIce and Icecast2 on Raspberry Pi

To use pulseaudio as the audio source, in the darkice.cfg, I simply changed this:
Code:
device = hw:1,0

to this:
Code:
device = pulse

Edit: I found that when trying to get darkice streaming to autostart along with TTD, it caused some issues, so I now have my cron jobs set up so that TTD starts immediately, and then darkice starts two minutes later. This seems to work so far. My crontab -e looks like this:

Code:
@reboot screen -dmS ttd-screen /home/pi/TTD/startTTD.sh
@reboot /bin/sleep 120 ; screen -dmS darkice-screen darkice

Have fun!

Andy

Has anyone had luck in implementing a RR feed from a pi that is also runnng TTD? I have been trying and can't seem to make the connection from Darkice to the pulseaudio source. If someone has done it, then i expect that I have missed something simple, otherwise, the troubleshooting may have to go deeper.

I have a RR feed set up and functioning on a standalone pi, just can't make the combo one work.

Any thoughts?

Thanks

Jim
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,323
Reaction score
116
Has anyone had luck in implementing a RR feed from a pi that is also runnng TTD? I have been trying and can't seem to make the connection from Darkice to the pulseaudio source. If someone has done it, then i expect that I have missed something simple, otherwise, the troubleshooting may have to go deeper.

I have a RR feed set up and functioning on a standalone pi, just can't make the combo one work.

Any thoughts?

Thanks

Jim

Jim,

I do have this working. All I did was set device = pulse in darkice.cfg along with changing the other parameters needed to stream to RR. I can send you my darkice.cfg when I get a chance.

Andy
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
Jim,

I do have this working. All I did was set device = pulse in darkice.cfg along with changing the other parameters needed to stream to RR. I can send you my darkice.cfg when I get a chance.

Andy

Thanks, Andy. Not sure what it was that turned things around but using your config.cfg, both TTD and RR feed are now working in tandem on my pi. Now that is the way to do it!
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
RPi icon for the map

I see on the TTD google map that there are some flames icons but mostly pushpins identifying locations where TTD is in use. Does anyone know how to get a Raspberry Pi icon that we could use on the map identifying those running TTD on a pi?
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
Jim,

I do have this working. All I did was set device = pulse in darkice.cfg along with changing the other parameters needed to stream to RR. I can send you my darkice.cfg when I get a chance.

Andy

Thanks for the help, Andy. I now have two pi's in production mode each runnng a feed and TTD. No problems thus far after two days. Both auto reboot and restore on restoration of power if there is a power failure.

Jim
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
TTD63pi error message

Andy,

I have been trying to put together a card image that will work out of the box for Pi users. I have been using the TwoToneDetect63pi.pyc file included with the v63 release. When running this I get an error message 'audio_threshold' not defined when I run the program. I can't seem to figure out the problem and am now wondering if it is in the v63 file. Attached is the screen information showing the error message as well as the config.cfg and tones.cfg information that I am using.

Your thoughts?

Thanks

Jim
 
Last edited:

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
Andy,

I have been trying to put together a card image that will work out of the box for Pi users. I have been using the TwoToneDetect63pi.pyc file included with the v63 release. When running this I get an error message 'audio_threshold' not defined when I run the program. I can't seem to figure out the problem and am now wondering if it is in the v63 file. Attached is the screen information showing the error message as well as the config.cfg and tones.cfg information that I am using.

Your thoughts?

Thanks

Jim

PROBLEM SOLVED (I think)

The fake password in the config.cfg file needed to be encoded. I copied in the password from the sample_config.cfg file and it now works.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
TTDpi simplified image

I think that I made significant progress this morning on TTDPi out of the box that I have been working on. I would like some pi folks to take a quick test drive to check it out for me before I invest the time in making a video of the procedure to set it up and make it work. Any suggestions for improvement would be great before I finalize the instructions.

Here is the link to the compressed image file (1.04Gb). It is compressed from a 4 Gb card so might fit on a 4Gb card but I would state that the minimum for reliable installation is an 8 Gb card. Unzip the image and flash it to an SD card as you would the pi operating system image.

https://sourceforge.net/projects/pittd/files/latest/download?source=files

1. The image is set to autostart the Pi and TTD on boot up. TTD runs in a detached screen. If you want to confirm this, it is $ screen -list and TTD should show up as a detached screen. The usb sound card needs to be plugged in prior to booting the pi to successfully launch TTD.
2. I have moved all the subsequent set up to the GUI to help satisfy mainstream America. So first step is to type startx to launch the GUI.
3. There should be icons on the desktop that will lead you to config.cfg, TonesEditor6, pavucontrol, and LevelMeter.
4. My instructions will then be to edit these items as appropriate following Andy's instructions in particular for setting the sound levels.
5. When done making these edits, power the pi down and then power it back up to implement these changes.

Please let me know how things go.

Jim

Edit: I should have completed my testing first. The USB sound compatibility issue raises its head again. The keyboard and mouse won't work so this setup still requires that one .ssh into the pi. Need to work on that some more.
 
Last edited:

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
Setup commands

copied from another thread:
I'm new to the Raspberry Pi World and I have been trying for two days to get TTD installed on my pi with no success as of yet. I have followed the instructions on TTD website on how to do this but I'm not even sure where exactly to copy and paste the modules and such. I just unboxed my Pi two days ago and installed NOOBS and I am using Raspbian. If someone could please give me some major assistance I would greatly appreciate it.

Attached is a .txt document that should be used in parallel with Andy's instructions. There are some little gotcha's like line wrap that can drive a noobie absolutely crazy (does that sound like the voice of experience?) Follow Andy's instructions and do the copy and paste from the .txt document. If you run into obstacles post your questions here. Once you have success in completing the installation, let us know here and we can help you through the configuration.
 
Last edited:

jackdanls1

Member
Joined
Mar 31, 2008
Messages
21
Reaction score
0
Location
Gratis, Ohio
Jim,

I ordered a cheap Chinese usb Sound card and still waiting on it to arrive, do I need to wait for it before I begin to install TTD on my Pi?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,323
Reaction score
116
Jim,

I ordered a cheap Chinese usb Sound card and still waiting on it to arrive, do I need to wait for it before I begin to install TTD on my Pi?

You can install everything but it won't run correctly until you get the sound card plugged in and configured with pulseaudio.

Andy
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,634
Reaction score
177
Location
Massachusetts
Jim,

I ordered a cheap Chinese usb Sound card and still waiting on it to arrive, do I need to wait for it before I begin to install TTD on my Pi?

You can do all of the setup except the paragraph in Andy's instructions regarding setting up pulseaudio. The instructions regarding LevelMeter won't work either without a sound card. Put in values of 3 for both input and output indices and set your audio threshold at 500 for starters in config.cfg. Then go back and adjust these later.

When you run the program you will get an error message in the last line indicating that it can't find the sound card.

Did you get the PM (private message) that I sent you?

Jim
 
Status
Not open for further replies.
Top