TILT!Audio the new audio experience for your pinball

Welcome to TILT!Audio. TILT!Audio is an alternative sound system that offers much better sound experience than original sound hardware. Its build based on a Raspberry Pi and a small shield that helps decoding sound commands coming from the main cpu.

TILT!Audio is the successor of RasPiSound so don’t get confused when in some forums or on my youtube channel it is called RasPiSound.

Wanna see it in action? Check out my youtube channel.

TILT!Audio is not a ready to use product that offers simple plug’n’play by simply replacing the old sound card. However you can easily build it for yourself.

Order Now!

You do not even by every little piece of hardware on your own, instead you can simply order kits on my shop, that makes assembly very easy.

You can even take a look at the schematics and the latest pcb or export gerbers to build the shield on your own. Everything you need is hosted on EasyEDA.

Posted in Uncategorized | Leave a comment

Github repo with extensions examples

Today I’ve updated the repository on github https://github.com/sker65/tiltaudio-extensions that contains some examples, how TILT!Audio board can be extended by adding addtional hardware / mods for your game.

The principle is always the same:

  • take an arduino mini pro
  • program it with some little sketch
  • connect i2c bus from tiltaudio board to extension
  • write some support library in lua for your convenience

With the examples provided you can control:

  1. Arbitrary GPIO and also PWM
  2. Shaker with motor controller like https://www.aliexpress.com/item/32914093516.html
  3. RGB led lights as speaker lights or rgb gi replacement
  4. Servo for addtional moveable toys on the playfield.

See my youtube channel for some examples.

I was also looking for a printable case for the arduino mini pro. I found one on adafruit website, that fit my needs (with minor modifications): https://www.tinkercad.com/things/0bF8IWiFE6x-arduino-mini-pro-case

So keep modding and send me your achievements.

Posted in Uncategorized | Leave a comment

TILT!Audio controls rgb led rings

With the new lua scripting support you can do “magic things” like control rgb led rings with the sound your machine is playing. Don’t believe it, just watch the video:

How does it work?

There’s 5 pieces you need to plug together:

  1. An arduino mini pro (5V 16Mhz) that controls the leds rings.
  2. Some leds rings (or other 2812 based rgb led strips from alibaba.com)
  3. TILT!Audio board 2.5f or newer that exposes the i2c bus.
  4. init.lua script on the tilt audio sd card for some convinience
  5. Arduino sketch to control the leds.

The sketch and the lua snippet can be found on github: https://github.com/sker65/tiltaudio-extensions

In order to program the arduino mini you need an FTDI usb to serial adapter (best is switchable between 3V3 and 5V). Arduino IDE to compile should be easy to manage, just ask goole there’s a lot of tutorials about that.

Then connect the led rings data pin is pin 4 (but this is configurable in the sketch).

Finally connect the i2c wires SDA, SLC (its a4/a5 on the arduino mini) plus GND and 5V from TILT!Audio board to the Arduino and you ready to play.

Be careful with the power consumption of the leds in my example its already 32 leds with 32*3*20mA = 1,9A when all are bright white. This would of course be already to much for the 5V output on the TILT!Audio board.

So if you add extra light in your pinball game, also add an extra power supply.

Posted in Uncategorized | Tagged , , , | Leave a comment

New firmware 1.29 with lua scripting

The new version of TILT!Audio firmware features better support for altsound sound packs and lua scripting support.

What is lua scripting?

In previous version there were already some command attached to a sound effect, either to control an attached shaker or the new port extender starting with 1.28 to control up to 16 additional GPIO ports directly with the TILT!Audio board.

Now lua scripting takes this to the next level. A command attached to a sound effect is per default simply passed to a lua script interpreter (see https://www.lua.org/). Lua script is a super easy to learn script language that lets you “program” what should happen when a certain sound effect gets played.

So everything you can do with special commands (control shaker, control GPIO, control serial media server, control various i2c devices e.g. ProMiniExtender) you can now also do with lua functions. Addtionally you can play additional sound effects or change volume all controlled by your lua script.

In order to make this work, TILT!Audio loads a lua script at startup (init.lua) that is located at the root directory of your sound pack, where you define all functions your going to use with your sound effects.

Example

Lets make an example:

--
-- this is the init.lua file with the sound pack
--
-- get shaker pin from main config
pinShaker = config.pin_shaker

-- define a fuction that activates shaker (on / off sequence)
-- only if a certain background music is playing

function shakeOnMultiball()
if musicPlayingId == 0x12 then
portseq( pinShaker, 100, 200, 100, 100 )
end
end

Now in the webUI choose the sound effect that should trigger the shaking …

As you can see the shakeOnMultiball checks which background music is playing and activates the shaker only if a certain music is playing. But this is just an example.

From lua you also can control custom sound playback:

Example: use a dummy sound file that actually contains only a second silence, but triggers a lua function:

-- init random generator
math.randomseed( os.time() )

-- remember if drain sound was played
ballDrained = 0

-- lua function to do custom sound handling
function playRandomEffect()
ballDrained = ballDrained + 1
soundEffectId = math.random(1000, 1004)
soundHandler( soundEffectId )
end

function playLooser()
if ballDrained > 2 then
soundHandler( 1010 )
ballDrained = 0
end
end

In this example we use addtional sound effect ids 1000-1004 and 1010 that the game normally don’t use (choose an arbitray high number). We create a matching row in altsound.csv (or directory in classic dir structure) and put the WAV files there.

The we call the lua functions like shown above and we will hear a random sound with the first function while the drain ball counter is increased. If playLooser sound triggers we play a “looser” sound if the was to many drained balls.

Of course this example requires the game to send the right trigger sounds when ball passes e.g. the outlane.

Tutorial video

I recorded a short video to demonstrate, what you can do with lua scripting. This will also be shown with light controller in my MSF later this month.

Tutorial video for lua scripting

Lua Reference

Global variabels

config: all the main config parameters from the raspisound.ini file as lua table. That means you can access it like config.say_version.

version: the version of the TILT!Audion firmware as string. e.g. “1.29”

musicPlayingId: the number of the currently playing background music (or 0 if none).

effectiveVolume: the effectiveVolume (overall volume).

Functions

soundHandler(id, volume, index): play a sound effect (or background music) from sound pack.
id: the sound effect id.
volume (optional): if set (0-30) override the standard volume from sound pack and play with given volume.
index (optional): if set, use a specfic sound file for the effect. This is only relevant, when the sound pack defines more than one sound file for this effect.

getSound( id ): returns a lua table (or nil) for the sound effect with given id. the lua table contains the properties:
name: the name of the sound effect.
samples: number if sound files for the effect (normally 1).
type: 1-6 depending on sound type: music, voice, effect ..
command: string if the effect has an command attached

getCurrentSoundPack(): returns the current sound pack as lua table.

port( pinNumber, value): set port to high or low. pinNumber is one of the valid Raspberry Pi pins the can be used for output (basically the shaker pin) or 100-115 for port extender pins. value = 0 -> LOW output, value != 0 -> HIGH output.

portseq( pinNumber, time1, time2, … ): queue a sequence of HIGH, LOW changes for a GPIO pin. pinNumber see above. time1, time2 … define the intervals in milliseconds, that will make the output go HIGH-LOW-HIGH …

send( command ): send a string command to attached device (either serial or via TCP, depending on config). Can be used with the serial media server.

sendI2C( deviceAdress, reg, data): send a command to an attached i2c device. deviceAddress is 1 Byte device address on i2c bus. reg is 1 byte register number, data is one byte data to write to register.

sendI2CW( deviceAdress, reg, data): send a command to an attached i2c device. deviceAddress is 1 Byte device address on i2c bus. reg is 1 byte register number, data is two byte data to write to register.

log( logLevel, message ): logs a message into main logfile. logLevel: 1=ERROR up to 4=DEBUG, message a string with log message. NOTE: normal print output will also go to the logfile if DEBUG is switched on.

setVolume( newVolume )

stopMusic(): stops background music

fadeMusic( milliSeconds ): fades background music in milliSeconds

fadeOutSfx( milliSeconds): fades out sfx sounds in milliSeconds

fadeOutVoice( milliSeconds): fades out voice sounds in milliSeconds

fadeOutAllEffects( milliSeconds): fades out both woice and sfx in milliSeconds

Posted in Scripting | Tagged , | Leave a comment

New firmware 1.28 with port extender is out

New firmware 1.28 is out: https://mega.nz/#!l4xyDI5I!qoBXKPpOlxKabubys3AqH6tNBpEhtj0eJvP5bU4uTSY

It has a few bugfixes and especially support for the port extender (with board rev 2.5f and newer)

To use extension port you simply can reuse the serialCmd field in the sound effect details. New 1.28 recognized a few additional commands: 
1. all commands for the serial media server (like before): PLAY, STOP und PLAYONEOF 
2. NEW commands for the port extender: PORT x ON, PORT x OFF oder PORTSEQ x n1 n2 n3 …

You can also combine both comamnd types in one, just use a colon as separator. X is the placeholder for the port number with the range 100-115 -> 16 outputs. The n1, n2 … values are timespans of milli seconds, in order to playback a sequence. The port pin then toggles on and off.

There is also a new settings page in the web ui, that allows for testing GPIOs and commands in general: 

With this testing page you can check and test your installation wihtout playing the actual sound effect.

Posted in Uncategorized | Leave a comment

TILT!Audio on my MSF game

I finally took the time this evening and put one of my spare TILT!Audio boards into my msf game. Took only a few minutes to replace and it plays very nice.

My msf has a few more mods like extra leds in backbox speakers, big color pin2dmd and also the whole gi is rgb. But to be honest the biggest thrill is always the new sound. Of course I replaced the speakers as well to get more volume and clearer sound.

Posted in Uncategorized | Leave a comment

What’s new with firmware 1.25

Better Wifi Setup

If wifi is not configured in the beginning and TILT!Audio cannot get an IP address it creates it own Wifi hotspot named „TILTAUDIO“. As soon as you see this wifi network appearing on your computer just connect by using the passphrase „tiltaudio“.

Then open the web ui in your browser on http://192.168.42.1:31008/

If you want to include the TILT!Audio system in your home wifi navigate to „Wifi“. Choose your wifi network and enter your passphrase, press „Setup Wifi“ and finally Reboot.

This will reboot the TILT!Audio system and after it is up again, you should reach the web ui by simply http://tiltaudio:31008/ . If this doesn’t work you need to find out the ip address by checking your router for a new device.

10 Band Equalizer

There are a couple of new synthetic audio devices, that add some signal processing before hand over sound to the hifi DAC. One of them is a 1 band equalizer, that allows fine tuning your sound output for TILT!Audio.

You can listen to every sound from your sound set or choose one of the test sounds and then fine tune the sound exactly for your system.

The equalizer is a global fine tuning, that applies the same „curve“ to all sounds from TILT!Audio. Of course it is still possible to add a per sound increase or decrease of volume.

Bugfixes / Changes:

  • Bugfix when loading altsound sound packs
  • Change default to enable_i2s to true so it matches all newer shields.
  • Added option to reboot from web ui as part of wifi setup
  • Rename low level service to “tiltaudio”. When ssh to pi use “sudo systemctl start/stop tiltaudio” …
  • Changes storage for “tmp settings” like sound set, volume and audio device to ta.ini file
  • Start web UI even without sound.
  • Bugfix: switch rotary support off, when i2s is on
Posted in Uncategorized | Leave a comment

Mounting TILT!Audio board on a WPC

See how easy it is to replace the old sound board from a WPC machine and replace it with a TILT!Audio board.

Replacing the old sound board

What I did already before:

  • Assemble and soldering the board itself
  • Replace the old speaker wiring in wpc machine with one dedicated wire pair to each speaker
  • Prepared the sd card for the pi. (load image, write to card & apply latest update)

Posted in Uncategorized | Leave a comment

Assembly instructions for 2.5c (green)

While all flaws from the former version 2.5a (blue) were fixed, I unfortunately introduced two new flaws:

Most important the 6 smoothing capacitors have no ground, which makes the sound humming if not fixed. Fix is easy, just remove small piece of the solder mask and create a connection to grounding surface around:

create connection
remove soldering mask

With the new OLED display there’s also a serious problem: Vcc (1) and GND (2) are interchanged. So please don’t connect it directly but use some kind of “adapter”.

Bend the Vcc Pin to the right
From the top side connect GND

For WPC the green board comes with an alternative power supply for the amplifiers: a adjustable DCDC step down regulator. Its easier to install and cheaper, but it needs to be adjusted in order not to overload the amplifiers. So please adjust output voltage to 12-15 V with the blue spindle pot.

The DCDC step down converter is an alternative to the linear regulator 72S15. Its an either or but not both installation. I reserve to deliver either one or the other depending on availability.

General advice with 3.96” connectors: remove the key pin before soldering! Take a pliers and pull it out. Newer boards have the key pin marked on pcb printing. For olders you need to check the original connector.

Posted in Uncategorized | Leave a comment

Assembly instructions for 2.5b (blue)

First and foremost the zero series blue boards have a flaw in the layout when used with on board power supply with WPC. There is one wire cut on the bottom near the rectifier and one additional wire needs to be placed. Sorry for that.

When I say elko its “electrolyte capacitors” and when I say right / left its always looking from the top where the logo is readable.

This is the recommended order of soldering components, each of them with some additional hints mostly because of some shortcomings of the zero series.

As a rule of thumb solder small things first, otherwise the big ones get in your way later.

Wire for DAC
  1. Solder the smd chips. Check orientation and put some extra fluid on the pcb if you have a fluid pen or something. Put plenty of solder on your iron and just move along the pins. If you create shorts then use some desoldering braid to remove solder again. There’s a couple of video out there with tips and tricks.
  2. Connectors: devided in 3 sections: Common, WPC only, DataEast only
    1. Common
      1. 3 pin header with jumper mode selector (DE / WPC). Place the jumper according to your machine
      2. H1 extension connector (optional) only for shaker / serial media extension
      3. Raspberry Pi connector: long pin version as you need some space to put a pi3 on the connector upside down. If you have one at hand just try “how high” the connector should be.
    2. WPC only:
      1. WPC data connector: looking from the top the notch is left. (pin 1 upper left)
      2. J504 / J505 WPC speaker connectors
      3. J501 WPC Aux Power connectors. Sometimes no 7 pin available then use 3+4 pin. Looking from the top 3rd pin from the right is key pin and therefore need to be cut off / pulled out.

  3. Resistors: just two resistors (560R to 4K7 exact value doesn’t matter, but equal) near the cabinet amplifier.
  4. DataEast only: 1K resistor and cap near CN3 for reading cabinet pot.
  5. 5V DC-DC buck converter module. Looking from the top lower left is “out+” upper left is “in+” in the right “gnd”
  6. Amplifier moduls: if you have the ones with white and red plastics applied, remove them first and push the pins to the bottom side with heat from the soldering iron. Maybe the pins need some tweaking to make the fit into the whole.
  7. DAC modul: just use the 6 pin header at the lower end. Looking from the top in the left side you need to connect only 2 wire “L” and “R”. Again zero series flaw the holes underneath do not exactly fit the modul holes, so please use some flexible wire to connect these (will be fixed in the next hardware revision).
  8. WPC only: on board power supply:
    1. Again minor zero series flaw: the heatsink is too far on the right so you need to tighten the linear regulator onto the heatsink by soldering not through the holes but only onto the pads (see picture).
    2. block rectifier. be aware of orientation + side / – side.
    3. Diode D2 and capacitor C1. If c1 is an elko looking from the top ground is lower hole (near c1 letters)
    4. Last: 6 big elkos: again small zero series flaw. the elkos
Linear regulator

General advice with 3.96” connectors: remove the key pin before soldering! Take a pliers and pull it out. Newer boards have the key pin marked on pcb printing. For olders you need to check the original connector.

After assembly do a step by step test if you have a meter first do some checks without pi applied. Just connect WPC aux power J501 and check voltages:

  • after rectifier about 20V
  • after linear regulator 15V (depending on reg type maybe 12V)
  • after DC DC buck converter 5V

If all is fine prepare sd card image and plugin the pi. If you like to use web ui please setup up your wifi right from the beginning.

Posted in Uncategorized | Leave a comment