Jump to content

Triggering sound cues


Just Some Bloke

Recommended Posts

I am working on an installation with a poetry group at the moment. One of the things they would like to have is a button (physical not virtual) that people can push which will trigger a poem to be played. I have recorded the poems and saved them as separate files. I now need to work out how they can be played back. I have 2 ideas so far:

 

SCS will allow me to assign each file to a separate key on a keyboard

Or

Powerpoint will allow me to start a sound file with a slide and I can use a clicker to change slides

 

What I need is some sort of magic button (that looks theatrical) that will interface with either of those.

 

Oh and, in an ideal world, they would like it to trigger the poems in a random order!

 

Any ideas?

Link to comment
Share on other sites

I reckon half an hour with a Raspberry Pi and I could knock that together. Might even try it as an exercise, I've got one handy right now.

 

It has a GPIO header (inputs and outputs) that makes it easy to use with external triggers.

 

Cheers,

 

Peter

Link to comment
Share on other sites

Something like this has a remote start function which is, I think just a contact. I think it can play one track at a time then pause too, and loop back to the start. I say this because I've seen one in a museum and I think that's what it was doing. But don't take my word for it!

 

Then just fill a CD with as many copies of the poems as you can in a "random" order.

Link to comment
Share on other sites

You can randomise cues in QLab, and while I have no experience of SCS I would be surprised if you couldn't do it in that too.

 

There must be boxes you can buy with just one button on, but I'm not sure what to google for that. If it's of any interest, I made, years ago, an arcade style controller which outputs keystrokes, with four layers which can all be programmed to different keystrokes. It's never really had any use but it was a fun project to build and I'm sure it'll come in handy one day.

 

I used one of these to convert the button pushes into keystrokes, but I'm sure it would be possible to strip an old keyboard and use the circuitry from that to save some money. You'll need to install it in a small box with a button of some sort, I used something like this, but there are plenty of options.

 

Andy

Link to comment
Share on other sites

Something like this has a remote start function which is, I think just a contact. I think it can play one track at a time then pause too, and loop back to the start. I say this because I've seen one in a museum and I think that's what it was doing. But don't take my word for it!

 

Then just fill a CD with as many copies of the poems as you can in a "random" order.

 

Just been looking at the quick start guide for this - the remote start may not operate as I thought (it may stop as well which you don't want) - it's not that clear.....

Link to comment
Share on other sites

I reckon half an hour with a Raspberry Pi and I could knock that together. Might even try it as an exercise, I've got one handy right now.

 

I was wrong. It took me an hour, but I did have to make half a dozen sample wavs and find a 10K resistor.

 

It's lovely and simple, about 15 lines of code and 1 resistor. If anyone is interested, I will post instructions here this evening.

 

Cheers,

 

Peter

Link to comment
Share on other sites

Seen as how people are looking at Qlab as a playback tool, can I suggest a U-HID Nano;

 

http://www.u-hid.com/home/uhid_nano.php

 

8 pins plus ground. Easily programmable to be any key press you so desire. They're pretty cheap and will do the job fine.

 

 

 

 

For a purely hardware-based system (but that won't do the random function you want) I reckon something from the MDFLY range will do. All just playback from a card, and file management is as simple as loading the card and prefixing the titles with a number.

 

http://www.mdfly.com/audio/

 

 

 

Link to comment
Share on other sites

How about one of these:

 

http://store.griffintechnology.com/powermate

 

http://store.griffintechnology.com/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/n/a/na16029_powermate_1.jpg

 

It's a "USB Button" (which is also twistable like a jog wheel). Programmable driver, so it can be made to emulate any key press in any application.

 

 

I'm aware of several applications where it's the only user-accessible control - the one that comes to mind is "one button studio", which is a sort of video-booth recording facility, with a mac mini behind ther scenes.

Link to comment
Share on other sites

I set up some Media player/TVs in a museum and alongside was a house brick sized box with a telephone handset and 6-10 buttons.

Each was to trigger a short reminiscence about the subject.

 

In a couple of weeks I have to go back and remove the Tvs so can find out

 

I have a feeling that DataVideo/Holdan made something similar for museums.

Link to comment
Share on other sites

Pete's Guide To How to do this with a Raspberry Pi.

 

You will require:

1 Raspberry Pi (plus power supply and SD card)

1 10K Resistor

1 Push to make switch

 

The circuit is simple. Check the header pins are correct for your version of the Pi, they should be correct but do check them.

 

http://www.ctc-productions.co.uk/images/PiPlayerCCT.jpg

 

The code is pretty simple as well. It is written in Python.

 

import Rpi.GPIO as GPIO
import pygame
import time
import random

GPIO.setmode(GPIO.BOARD)
GPIO.setup (3, GPIO.IN)
pygame.mixer.init()

tracks = ['1.wav', '2.wav', '3.wav', '4.wav', '5.wav']

while True:
 try:
    if (GPIO.input(3) == False):
       pygame.mixer.music.load(random.choice(tracks))
       pygame.mixer.music.play()
       time.sleep (5);
 except KeyboardInterrupt:
    GPIO.cleanup ()
    exit ()

 

Save this as player.py

To run it type

sudo python player.py

at the command line

 

You list your audio files in the line: tracks = ['1.wav', '2.wav', '3.wav', '4.wav', '5.wav']

The filenames don't have to be numeric, you could use proper filenames. If you've got more than 5 audio files just add more to the list, you won't have to change anything else in the code.

 

time.sleep (5); is to stop repeat button presses or the button being held down being detected and starting another track. It is currently set at 5 seconds, you could change it to suit your application. It effectively locks out any new button presses being detected for the period of time specified.

 

The except KeyboardInterrupt bit happens if the user press Ctrl-C to exit. The following couple of lines just clean up stuff properly.

Err, that's it really. 17 lines of code, quite pleased with that!

 

If you can't get sound out of the 3.5mm jack try this:

sudo amixer cset numid=3 1

It routes sound to the jack socket.

 

Cheers,

 

Peter

Link to comment
Share on other sites

I remain astounded that everyone who does this malarkey doesn't have a contact closure to MIDI box.

 

There are loads of options: Fully boxed there is the MIDI Solutions interface, for board level just needeng a box the Liquid MIDI is an obvious choice, but those handy with a Arduino might like to try an miduino or a Sparkfun MIDI shield, and component level folk may fancy something inspired by the MIDIBox collection.

 

But whatever, get something, and put it on the shelf for the day you need it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.