mt32-pi lite for MiSTer

Discussion of official MiSTer Project addons. (https://github.com/MiSTer-devel/Hardware_MiSTer)


espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

mt32-pi lite for MiSTer

Unread post by espo83 »

I built a mt32pi_lite. I used the Gerbers from the release and put it all together and I'm not sure where to go from here. It appears in the ao86 core. the OSD works I see the bars moving. I have the setting for i2s as the output but I'm getting no sound. I am using the 5.5 Analog I/O board, and per the suggestion on the Git I tried added a bank of 10k resistors where they appear in the 5.6 board, still no sound. Just looking for any suggestions.

LTWpApA.jpeg
LTWpApA.jpeg (130.1 KiB) Viewed 7050 times
JdXjImr.jpeg
JdXjImr.jpeg (151.87 KiB) Viewed 7050 times
MAxiHrl.jpeg
MAxiHrl.jpeg (101.5 KiB) Viewed 7050 times

Content of my config(i edit it with notepad++)

Code: Select all

#                                  ________    _______                      __
#                         __      /_____   `. /____   `.                   /__`
#     ____   ____     __/  /____  _______)  / ______)  / ____  ______      __
#   /   __ v  __  `./__   _____//_____    < /   _____. /____//   ___  `. /  /
#  /  /  /  /  /  /   /  /____  _______)  //  /______       /  /____/  //  .__
# /__/  /__/  /__/    \______//_________. /_________/      /   ______.  \____/
# /////////////////////////////////////////////////////// /  / //// /// // /
#                                                         ```
# mt32-pi.cfg: mt32-pi configuration file.
# Default options are marked with an asterisk (*).

# -----------------------------------------------------------------------------
# System options
# -----------------------------------------------------------------------------
[system]

# Enable or disable verbose startup and error output.
#
# When enabled, outputs more information to the LCD when starting up, and when
# MIDI/UART errors are detected.
#
# This also may hide the boot logo on smaller graphical displays.
#
# Values: on, off*
verbose = off

# Set the default synthesizer to be made active on startup.
#
# If the default synthesizer is unavailable (e.g. missing ROMs or SoundFonts),
# the first working synth is made active.
#
# Values: mt32*, soundfont
#
# mt32:      Use mt32emu (Munt) for Roland MT-32 emulation
# soundfont: Use FluidSynth for SoundFont synthesis
default_synth = mt32

# Enable or disable support for USB devices.
#
# Disable this to speed up boot time if you are not using any USB devices.
#
# Values: on*, off
usb = off

# Set the I2C baud rate/clock speed for all peripherals (Hz).
#
# Most peripherals will work fine at the default speed (400KHz "fast mode"),
# but larger LCD/OLED displays (e.g. 4-line I2C HD44780 and 64 pixel high
# SSD1306) won't be able to refresh at 60FPS at the default setting.
#
# Try increasing this value to 1000000 (1MHz) for a smoother LCD refresh rate.
# If your display doesn't work, try backing off the speed 100KHz at a time
# until it does.
#
# Values: 100000-1000000 (400000*)
i2c_baud_rate = 400000

# Set the timeout for power saving mode (seconds).
#
# After the specified number of seconds of silence, the CPU clock speed will be
# reduced, the audio device will be stopped, and and the LCD's backlight will
# be turned off to save energy (certain I2C displays only).
#
# Any MIDI activity will instantly bring the system out of power saving mode.
#
# If set to 0, power saving mode is disabled.
#
# Values: 0-3600 (300*)
power_save_timeout = 300

# -----------------------------------------------------------------------------
# MIDI options
# -----------------------------------------------------------------------------
[midi]

# Set the baud rate used for GPIO MIDI.
#
# For connecting to standard MIDI devices (i.e. via DIN cable), this should be
# left at the default rate of 31250.
#
# For connecting to PCs, set this to match the baud rate of the other host.
# SoftMPU's serial MIDI mode, for example, uses a baud rate of 38400.
#
# Values: 300-4000000 (31250*)
gpio_baud_rate = 31250

# Enable or disable software "MIDI thru" on the GPIO Tx pin.
#
# When enabled, all data received via the GPIO Rx pin will be re-transmitted
# verbatim on the Tx pin. This may be useful for debugging or for passing MIDI
# data through to another synth.
#
# Values: on, off*
gpio_thru = off

# Set the baud rate used for USB serial MIDI.
#
# The same considerations from the gpio_baud_rate setting above apply here.
# The default value is a PC baud rate and matches SoftMPU's serial MIDI mode.
#
# The range of valid baud rates may vary depending on the chipset of your USB
# serial device, so the range of values suggested below may actually be greater.
#
# Values: 9600-115200 (38400*)
usb_serial_baud_rate = 38400

# -----------------------------------------------------------------------------
# Audio options
# -----------------------------------------------------------------------------
[audio]

# Select audio output device.
#
# Values: pwm*, i2s
#
# pwm: Use the headphone jack
# hdmi: Use the HDMI port
# i2s: Use an I2S DAC
output_device = i2s

# Sample rate of audio output (Hz).
#
# mt32emu uses an internal sample rate of 32000Hz (just like the real hardware)
# which is then resampled to this value.
#
# FluidSynth renders at this sample rate directly.
#
# Values: 32000-192000 (48000*)
sample_rate = 48000

# Set audio rendering chunk size (samples).
#
# A single stereo frame of audio has two samples, and so this value is double
# the number of frames per chunk.
# The smaller the chunk size, the lower the latency, but too low a value will
# cause underruns (distortion artifacts).
#
# Latency is a function of chunk size and sample rate, for example:
# 256 samples / 2 channels / 48000Hz * 1000ms = 2.67ms of latency.
# See documentation for recommended values for various Raspberry Pi models.
#
# The minimum value varies depending on audio output device.
# For PWM, the minimum is 2, for I2S the minimum is 32.
# For HDMI, the minimum is 384, and will be rounded to the nearest multiple of
# 384.
#
# Values: 2-2048 (256*)
chunk_size = 256

# Set address (hexadecimal) of I2C DAC control interface.
#
# This will be used for the initialization sequence (see below) if enabled.
# You can find the address of your DAC by using the i2cdetect utility in Linux.
#
# Values: 00-80 (4c*)
i2c_dac_address = 4c

# Select an initialization sequence for the DAC.
#
# Some DACs require some initialization commands to be sent via I2C before they
# will produce any sound.
#
# Values: none*, pcm51xx
#
# pcm51xx: for DACs based on PCM5121 or similar (e.g. PCM5141, PCM5242)
i2c_dac_init = none

# -----------------------------------------------------------------------------
# Control options
# -----------------------------------------------------------------------------
[control]

# Set the physical control scheme.
#
# See documentation for GPIO pinouts/wiring details.
#
# Values: none*, simple_buttons, simple_encoder
#
# none:           No physical controls
# simple_buttons: Simple 4-button scheme
# simple_encoder: Simple 2-button + rotary encoder scheme
scheme = none

# Set the rotary encoder type (if used by control scheme).
#
# Different rotary encoders may complete different fractions of a Gray-code
# cycle per detent ("click").
#
# If four clicks are needed for a single movement, try "quarter".
# If two clicks are needed for a single movement, try "half".
#
# Values: quarter, half, full*
encoder_type = full

# Reverse the rotary encoder direction (if used by control scheme).
#
# Some rotary encoders may have their CLK/DAT signals swapped, resulting in
# a reversed rotation direction.
#
# Use this option to correct the direction.
#
# Values: on, off*
encoder_reversed = off

# Enable or disable the I2C MiSTer control interface.
#
# If using mt32-pi with a MiSTer FPGA system and custom hardware to interface
# with MiSTer's User Port, enable this option to allow controlling mt32-pi via
# the MiSTer's on-screen display.
#
# Values: on, off*
mister = on

# Set the timeout for switching SoundFonts (seconds).
#
# When switching SoundFonts using the physical button, there is a short delay
# before loading begins. This option allows you to set the number of seconds to
# wait before loading.
#
# Values: 0-3600 (3*)
switch_timeout = 3

# -----------------------------------------------------------------------------
# MT-32 emulator options
# -----------------------------------------------------------------------------
[mt32emu]

# Set gain factor applied to synthesizer output channels.
#
# This is independent of the master volume that can be set via MIDI SysEx or
# the volume knob.
#
# Values: 0.0-256.0 (1.0*)
gain = 1.0

# Set gain factor applied to reverb wet output channels.
#
# Values: 0.0-infinity (1.0*)
reverb_gain = 1.0

# Select quality level for the resampler.
#
# If set to none, audio output will sound wrong unless you set the sample rate
# option to 32000Hz, which is the MT-32's native sample rate.
#
# Values: none, fastest, fast, good*, best
resampler_quality = good

# Select initial MIDI channel assignment.
#
# The MT-32 uses an unusual MIDI channel assignment by default. On a real MT-32
# this is set using a button combination. Use this option to change the initial
# channel assignment on startup.
#
# Values: standard*, alternate
#
# standard:  Parts 1-8 = MIDI channels 2-9, Rhythm part = MIDI channel 10
# alternate: Parts 1-8 = MIDI channels 1-8, Rhythm part = MIDI channel 10
midi_channels = standard

# Select initial ROM set to use.
#
# If multiple ROM sets are available, this option determines which set to use
# on startup. If the ROM set specified here is unavailable, the first available
# set is used instead.
#
# Values: old*, new, cm32l
rom_set = old

# Set whether the stereo channels should be swapped or not.
#
# The MT-32 interprets values for MIDI CC#10 (panpot) differently to later
# synthesizers, which means that 0 = right and 127 = left; the opposite of what
# is stated in the most recent versions of the MIDI specification.
#
# Enable this option to swap the channels and make MT-32 mode's panning
# behavior match the behavior of SoundFont mode. Note that this can also be
# switched at runtime with a custom SysEx command.
#
# Values: on, off*
reversed_stereo = off

# -----------------------------------------------------------------------------
# SoundFont synthesizer options
# -----------------------------------------------------------------------------
[fluidsynth]

# Set the initial SoundFont to use.
#
# If multiple SoundFonts are available, this option determines which SoundFont
# to use on startup.
#
# On startup, the "soundfonts" directory is scanned for valid SoundFonts, which
# are added to a list and sorted into alphabetical order.
#
# This setting is a zero-indexed offset into that list (i.e. 0 is the first,
# 1, is the second, and so on).
#
# If the index specified is unavailable, the first available SoundFont will be
# used.
#
# Values: 0-255 (0*)
soundfont = 0

# Set the master volume gain.
#
# The default is a low value to avoid clipping when many notes are playing at
# once.
#
# The value should be a decimal value between 0.0 and 10.0. Values outside this
# range will be clamped.
#
# Values: 0.0-10.0 (0.2*)
gain = 0.2

# Set the maximum number of voices that can be played simultaneously.
#
# Depending on the complexity of your SoundFont, you may need to reduce this
# value to prevent audio buffer underruns (distortion) when playing music
# featuring lots of notes being played at once.
#
# On the other hand, you may want to try raising this value if your Pi is
# being run overclocked or has a more powerful CPU (e.g. Pi 4/CM4).
#
# N.B. larger file size of the SoundFont does not imply higher CPU usage.
# SoundFonts that use more real-time effects (modulators) are more likely to
# require a reduction in polyphony.
#
# Values: 1-65535 (200*)
polyphony = 200

# The following settings set the default parameters for FluidSynth's reverb and
# chorus effects.
#
# Each setting can be overridden on a per-SoundFont basis by adding extra
# sections, e.g. [fluidsynth.soundfont.x], where x is the zero-based index of
# the SoundFont. See the next section for an example.
#
# Full descriptions and valid value ranges for each setting can be found in the
# FluidSynth documentation: https://www.fluidsynth.org/api/fluidsettings.xml
reverb = on
reverb_damping = 0.0
reverb_level = 0.9
reverb_room_size = 0.2
reverb_width = 0.5

chorus = on
chorus_depth = 8.0
chorus_level = 2.0
chorus_voices = 3
chorus_speed = 0.3

# -----------------------------------------------------------------------------
# FluidSynth effects profile for SoundFont 0 (GeneralUser GS)
# -----------------------------------------------------------------------------
[fluidsynth.soundfont.0]

# The following settings are recommended for GeneralUser GS by its author.
reverb = on
reverb_damping = 0.19
reverb_level = 0.5
reverb_room_size = 0.7
reverb_width = 0.75

chorus = on
chorus_depth = 4.5
chorus_level = 0.5
chorus_voices = 3
chorus_speed = 0.35

# -----------------------------------------------------------------------------
# LCD/OLED display options
# -----------------------------------------------------------------------------
[lcd]

# Select LCD driver.
#
# Note that LCDs connected via I2C, you must also set the correct address for
# your device via the i2c_lcd_address option. Consult its datasheet, or see
# our documentation for tested models and their configurations.
#
# Values: none*, hd44780_4bit, hd44780_i2c, sh1106_i2c, ssd1306_i2c
#
# none:         No LCD
# hd44780_4bit: Hitachi HD44780 or compatible (e.g. WS0010, RS0010) character
#               LCD connected to GPIO pins in 4-bit mode (see documentation for
#               pinout)
# hd44780_i2c:  As above, but using an I2C "backpack"
# sh1106_i2c:   Small I2C-based OLED graphical display (usually 1.3")
# ssd1306_i2c:  Small I2C-based OLED graphical display (usually 0.96")
type = ssd1306_i2c

# Set the width of the LCD.
#
# If the display is a character display, this value is measured in characters.
# Otherwise, for a graphical display, this is measured in pixels.
#
# Note that not all dimension settings are valid; see documentation for valid
# configurations for each LCD driver.
#
# Values: 20-128 (128*)
width = 128

# Set the height of the LCD.
#
# Same characters vs. pixels considerations as for width.
#
# Values: 2-64 (32*)
height = 64

# Set address (hexadecimal) of I2C LCD.
#
# This will be used to communicate with LCDs connected via the I2C bus.
#
# Values: 00-80 (3c*)
i2c_lcd_address = 3c

# Rotate the display output (graphical LCDs only).
#
# Some graphical displays support rotation. Use this option if you need to turn
# the display around.
#
# Values: normal*, inverted
#
# normal:   No rotation
# inverted: The display output is upside down
rotation = normal

# -----------------------------------------------------------------------------
# Network options
# -----------------------------------------------------------------------------
[network]

# Select the network mode.
#
# For setting your Wi-Fi SSID and encryption key, see wpa_supplicant.conf.
# Note that if using Ethernet on a Raspberry Pi 3B/3B+, USB must be enabled.
#
# off:      Disable networking
# ethernet: Enable using the Ethernet interface
# wifi:     Enable using the the Wi-Fi interface
#
# Values: off*, ethernet, wifi
mode = off

# Enable or disable DHCP for configuring the network.
#
# If disabled, the manual settings below will be used to configure your network
# interface instead.
#
# Values: on*, off
dhcp = on

# Manual settings for configuring the network interface.
#
# These settings will be ignored if DHCP is enabled.
#
# Values: correctly-formatted IP address/subnet mask, e.g. AAA.BBB.CCC.DDD
#         (four numbers in the range 0-255 separated by periods)
ip_address = 192.168.1.100
subnet_mask = 255.255.255.0
default_gateway = 192.168.1.1
dns_server = 192.168.1.1

# Set the network hostname.
#
# Values: a valid hostname using ASCII letters 'a' to 'z', digits 0-9, and
#         hyphens (*mt32-pi)
hostname = mt32-pi

# Enable or disable the RTP-MIDI/AppleMIDI server.
#
# This allows you to send MIDI data to mt32-pi over the network using macOS'
# built-in network MIDI features, or rtpMIDI by Tobias Erichsen on Windows.
#
# Values: on*, off
rtp_midi = on

# Enable or disable the embedded FTP server.
#
# This FTP server is a very basic implementation which DOES NOT feature any kind
# of transport layer security/encryption. Therefore, you should NOT enable this
# feature on a public network or expose the Raspberry Pi to the Internet.
#
# The FTP server should be considered a convenience feature only, for performing
# updates and configuration changes without having to replace the SD card.
#
# Values: on, off*
ftp = off

# Set the FTP server username and password.
#
# Values: any ASCII string (*mt32-pi)
ftp_username = mt32-pi
ftp_password = mt32-pi
MorkMikael
Posts: 96
Joined: Thu Jun 04, 2020 9:01 pm
Has thanked: 16 times
Been thanked: 19 times

Re: mt32-pi lite for MiSTer

Unread post by MorkMikael »

sorry cant help with the mt32pi_lite but i can recommend get the sharp X68000 core ver 22.02.14.
find Akumajou dracula.hdf file and run sasi hard disk option.and load the game and select the 2 option if the mt32pi_lite work there then it works.
dos some times need more setting to get right. and memory to get right.
espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by espo83 »

Thank you for the suggestion. I did load up the x68000 core and Akumajou Dracula, I experience the same behavior, the MT32Pi is seen, the osd shows the Midi is getting to the MT32 because I can see the bars moving and instrument names. But the audio isn't making it back to the mister or isn't getting mixed into the HDMI.
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: mt32-pi lite for MiSTer

Unread post by flynnsbit »

try a different resistor or temporarily no resistor at R1 to test, or did you go cheap and get your MiSTer IO board from AliExpress or somewhere that said "Manual Welding"?

If so, your analog board and the USER IO port is missing parts.

EDIT: nevermind, I see them in your picture, but what are the blue lines going to that you have soldered on there?

If you set output_device = pwm in the mt32 ini do you get audio out of the headphone jack on the raspberry pi?
espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by espo83 »

I could try a different resistor, I have tried no resistor. Every troubleshooting step I have tried yields the same result I get the OSD I see that the bars are moving and the instruments are named, the MiSTer controls it, i just don't get MIDI sound the rest of the effects work. When I turn my audio all the way up I do hear a brief audio pop when launching a game, but that may just be normal I dont typically crank the volume. I got my I/O board from MisterAddOns in March of 2019, maybe its just too old. I have validated the P7 Header pins are there (that's actually where I soldered most of the connections for the 10k resistor array). I guess my next step will be to try it on my friends 6.1 digital I/O and see if it works there, that way I know if I need to mess with the MiSTer or the MT32Pi.


The blue wires are to a 10k resistor array per the not on the mt32 wiki https://github.com/dwhinham/mt32-pi/wiki/MiSTer-FPGA.
Note: A MiSTer I/O board is required to use the HAT, ideally version 5.6 or later. If you have a version 5.5 I/O board, it may be necessary to carry out minor modifications if you experience problems. Compare the schematics for I/O board 5.5 and I/O board 5.6, paying close attention to the six 10K pull-up resistors R39 to R44 that were added in version 5.6, and try adding them to your 5.5 board if you have have issues related to sound or the mt32-pi menu not appearing in the OSD.

Thanks for responding, and thanks for the top300 pack!
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: mt32-pi lite for MiSTer

Unread post by flynnsbit »

Yeah good to test on the 6.1 to be sure. If it came from misteraddons it should be solid. I don't have one to test against.

Do try the pwm mode and see if you get audio out of the pi itself with that setting set. In this scnerio you should only hear the MIDI sounds from the pi as it wont mix the FM sound back like the i2s option does. That should for sure work. If not, then the pi isn't receiving data at all, even if the mister OSD is saying it is sending. It is detecting the Pi though or you wouldn't ever see the menu option on the mister side.

Also, do you have any SNAC stuff for controllers, does that work over that port?

You are very welcome. Glad people are using it.
espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by espo83 »

I couldn't test pwm because my Pi doesn't have a headphone jack, but I set output to HDMI, which outputs over the hdmi of the pi and that works. So i know the Pi is working. I don't have any snac stuff, this is my first time using the user port, but that I'm getting audio over HDMI gives me hope.
chopperthedog
Posts: 17
Joined: Fri Oct 15, 2021 10:47 pm
Has thanked: 12 times
Been thanked: 4 times

Re: mt32-pi lite for MiSTer

Unread post by chopperthedog »

Open osd, pad left and check global volumes.



good day.
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: mt32-pi lite for MiSTer

Unread post by flynnsbit »

yeah that is a good thing. Sorry I forgot the Zero doesn't have analog audio... So probably specific SNAC port and even more specifically the i2S lines as i2C is how the display is getting data.
https://github.com/dwhinham/mt32-pi/wik ... ace-pinout
So you need to figure out what is going to with the i2s pins on this diagram.
User avatar
d.ti
Posts: 26
Joined: Tue May 26, 2020 3:35 pm
Has thanked: 7 times
Been thanked: 12 times

Re: mt32-pi lite for MiSTer

Unread post by d.ti »

@espo83: Did you modify your IO Board to output IO6 instead of 3.3 V on the corresponding User Port Pin?

viewtopic.php?p=23045#p23045

If not this could be your issue because that signal is used for I2S Data.
Find my projects on Github: https://github.com/dtimber/
espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by espo83 »

@d.ti: I did not, I will read up on this. So far the only modification to my I/O board are the six 10K pull-up resistors R39 to R44. For VCC on that I used the 3.3 on VGA pwr.

lYeGNAN.png
lYeGNAN.png (13.91 KiB) Viewed 5959 times

In other news, it did work on my friends 6.1 digital I/O board so I know the MT32pi is built and configured right. I've just got to get my I/O port sorted.
espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by espo83 »

Ok so cutting the trace after C7 and jumping the usb pin that would have connected to that trace with a 100ohm resistor to to pin 10 on the board seems to work.
User avatar
d.ti
Posts: 26
Joined: Tue May 26, 2020 3:35 pm
Has thanked: 7 times
Been thanked: 12 times

Re: mt32-pi lite for MiSTer

Unread post by d.ti »

If you say that this seems to work, do you mean that you are now getting sound from the MT32 pi?
Find my projects on Github: https://github.com/dtimber/
espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by espo83 »

d.ti wrote: Thu Mar 10, 2022 5:37 am If you say that this seems to work, do you mean that you are now getting sound from the MT32 pi?
Yeah for sure I'm getting sound. And thank you for pointing me in the right direction.

I'm just not sure what that fix does. I looked for a reference to IO6 in the documentation for the MT32 or on the schematics for the 5.5 and 5.6 i/o board since its my understanding that the mt32pi works without modifying the 5.6 board. I don't see mention of IO6 until the 6.1 revision of the board. I also don't see it mentioned in the MiSTer doc on the User port.

https://github.com/MiSTer-devel/Main_Mi ... rial-IO%29

I would just like to fully document what I did and why it worked in case others have the same issue.
User avatar
RealLarry
Top Contributor
Posts: 881
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 385 times

Re: mt32-pi lite for MiSTer

Unread post by RealLarry »

Just want to throw in that I'm owning three MiSTer setups. 2x I/O 5.6XL, every with a mt32-pi (RPi 3A+), driven by user-port and sound out by HDMI works quite well. Played for hours with AO486 and Atari ST cores. The third one has an I/O 6.1 but untested with these mt32-pi's for now.
Power source is a self build one, based upon a MeanWell RS-25-5, regulated to 5.1V.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
mbandala
Posts: 8
Joined: Mon May 25, 2020 2:22 pm

Re: mt32-pi lite for MiSTer

Unread post by mbandala »

Can anyone provide a link to that special USB 3.0 connector?
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: mt32-pi lite for MiSTer

Unread post by flynnsbit »

mbandala wrote: Tue May 03, 2022 4:41 pm Can anyone provide a link to that special USB 3.0 connector?
https://www.amazon.com/gp/product/B07T9LWWZ9
mbandala
Posts: 8
Joined: Mon May 25, 2020 2:22 pm

Re: mt32-pi lite for MiSTer

Unread post by mbandala »

flynnsbit wrote: Tue May 03, 2022 9:13 pm
mbandala wrote: Tue May 03, 2022 4:41 pm Can anyone provide a link to that special USB 3.0 connector?
https://www.amazon.com/gp/product/B07T9LWWZ9
Thanks!
retango
Posts: 3
Joined: Fri Mar 19, 2021 6:07 pm
Has thanked: 3 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by retango »

Hi!
Thanks a lot for this post.. I have the Analog IO Board 5.5, and it helped me make the MT-32Pi send the sound over hdmi.
A note in case someone is in the same situtation: I did not need the 6 pullup resistors. I only did this mod:
espo83 wrote: Thu Mar 10, 2022 2:29 amcutting the trace after C7 and jumping the usb pin that would have connected to that trace with a 100ohm resistor to to pin 10 on the board
as seen here: viewtopic.php?p=23045#p23045 (the yellow line on the right image, only the one that goes from the resistor "100" to pin 10 on P6, plus that "100" resistor). After this change, the MT32 pi worked fine, as well as my Blisster.
Just a side note, on the MT32 settings (in the mt32 sd card), I had to use audio=i2s instead of audio=hdmi to get audio via hdmi.
Thanks again!
skyfire
Posts: 8
Joined: Wed May 27, 2020 9:49 pm
Has thanked: 6 times
Been thanked: 3 times

Re: mt32-pi lite for MiSTer

Unread post by skyfire »

Is a latest 6.1 I/O required for a mt32-pi lite? Says it is here:

https://ultimatemister.com/product/mt32 ... or-mister/

But other people have said it isn't. I currently have a 5.6XL.
User avatar
d.ti
Posts: 26
Joined: Tue May 26, 2020 3:35 pm
Has thanked: 7 times
Been thanked: 12 times

Re: mt32-pi lite for MiSTer

Unread post by d.ti »

IO Board Revision 5.6 isn't compatible with mt32-pi lite out of the box. You need to cut the 3.3V supply pin and wire IO6 to this pin on the user port.
Find my projects on Github: https://github.com/dtimber/
olsenn
Posts: 3
Joined: Sun May 29, 2022 7:11 pm
Been thanked: 1 time

Re: mt32-pi lite for MiSTer

Unread post by olsenn »

I don’t understand why a discrete mt32-pi hardware is needed for the MiSTer project; why can’t they just implement the Roland Mt-32 logic in the FPGA fabric for the applicable cores such as AO486 implements SoundBlaster in soft core? Why is a separate raspberry pi and dedicated hardware required for a little midi plugin?
FPGA64
Top Contributor
Posts: 937
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 374 times

Re: mt32-pi lite for MiSTer

Unread post by FPGA64 »

Because its far from a simple midi plugin. It emulates a full midi synth with its own roms. Yes that could probably be written as a FPGA version but it would not be a trivial exercise.
cellarboy
Posts: 1
Joined: Mon Sep 30, 2024 11:51 am

Re: mt32-pi lite for MiSTer

Unread post by cellarboy »

Sorry to dig up an old thread, but how did you use the PCB files in the Github repo to produce Gerber files? The files in the repo dont seem recognized by any of the PCB manufacturers.

Thanks in advance.

espo83 wrote: Sun Mar 06, 2022 7:38 pm

I built a mt32pi_lite. I used the Gerbers from the release and put it all together and I'm not sure where to go from here. It appears in the ao86 core. the OSD works I see the bars moving. I have the setting for i2s as the output but I'm getting no sound. I am using the 5.5 Analog I/O board, and per the suggestion on the Git I tried added a bank of 10k resistors where they appear in the 5.6 board, still no sound. Just looking for any suggestions.

LTWpApA.jpeg
JdXjImr.jpeg
MAxiHrl.jpeg

Content of my config(i edit it with notepad++)

Code: Select all

#                                  ________    _______                      __
#                         __      /_____   `. /____   `.                   /__`
#     ____   ____     __/  /____  _______)  / ______)  / ____  ______      __
#   /   __ v  __  `./__   _____//_____    < /   _____. /____//   ___  `. /  /
#  /  /  /  /  /  /   /  /____  _______)  //  /______       /  /____/  //  .__
# /__/  /__/  /__/    \______//_________. /_________/      /   ______.  \____/
# /////////////////////////////////////////////////////// /  / //// /// // /
#                                                         ```
# mt32-pi.cfg: mt32-pi configuration file.
# Default options are marked with an asterisk (*).

# -----------------------------------------------------------------------------
# System options
# -----------------------------------------------------------------------------
[system]

# Enable or disable verbose startup and error output.
#
# When enabled, outputs more information to the LCD when starting up, and when
# MIDI/UART errors are detected.
#
# This also may hide the boot logo on smaller graphical displays.
#
# Values: on, off*
verbose = off

# Set the default synthesizer to be made active on startup.
#
# If the default synthesizer is unavailable (e.g. missing ROMs or SoundFonts),
# the first working synth is made active.
#
# Values: mt32*, soundfont
#
# mt32:      Use mt32emu (Munt) for Roland MT-32 emulation
# soundfont: Use FluidSynth for SoundFont synthesis
default_synth = mt32

# Enable or disable support for USB devices.
#
# Disable this to speed up boot time if you are not using any USB devices.
#
# Values: on*, off
usb = off

# Set the I2C baud rate/clock speed for all peripherals (Hz).
#
# Most peripherals will work fine at the default speed (400KHz "fast mode"),
# but larger LCD/OLED displays (e.g. 4-line I2C HD44780 and 64 pixel high
# SSD1306) won't be able to refresh at 60FPS at the default setting.
#
# Try increasing this value to 1000000 (1MHz) for a smoother LCD refresh rate.
# If your display doesn't work, try backing off the speed 100KHz at a time
# until it does.
#
# Values: 100000-1000000 (400000*)
i2c_baud_rate = 400000

# Set the timeout for power saving mode (seconds).
#
# After the specified number of seconds of silence, the CPU clock speed will be
# reduced, the audio device will be stopped, and and the LCD's backlight will
# be turned off to save energy (certain I2C displays only).
#
# Any MIDI activity will instantly bring the system out of power saving mode.
#
# If set to 0, power saving mode is disabled.
#
# Values: 0-3600 (300*)
power_save_timeout = 300

# -----------------------------------------------------------------------------
# MIDI options
# -----------------------------------------------------------------------------
[midi]

# Set the baud rate used for GPIO MIDI.
#
# For connecting to standard MIDI devices (i.e. via DIN cable), this should be
# left at the default rate of 31250.
#
# For connecting to PCs, set this to match the baud rate of the other host.
# SoftMPU's serial MIDI mode, for example, uses a baud rate of 38400.
#
# Values: 300-4000000 (31250*)
gpio_baud_rate = 31250

# Enable or disable software "MIDI thru" on the GPIO Tx pin.
#
# When enabled, all data received via the GPIO Rx pin will be re-transmitted
# verbatim on the Tx pin. This may be useful for debugging or for passing MIDI
# data through to another synth.
#
# Values: on, off*
gpio_thru = off

# Set the baud rate used for USB serial MIDI.
#
# The same considerations from the gpio_baud_rate setting above apply here.
# The default value is a PC baud rate and matches SoftMPU's serial MIDI mode.
#
# The range of valid baud rates may vary depending on the chipset of your USB
# serial device, so the range of values suggested below may actually be greater.
#
# Values: 9600-115200 (38400*)
usb_serial_baud_rate = 38400

# -----------------------------------------------------------------------------
# Audio options
# -----------------------------------------------------------------------------
[audio]

# Select audio output device.
#
# Values: pwm*, i2s
#
# pwm: Use the headphone jack
# hdmi: Use the HDMI port
# i2s: Use an I2S DAC
output_device = i2s

# Sample rate of audio output (Hz).
#
# mt32emu uses an internal sample rate of 32000Hz (just like the real hardware)
# which is then resampled to this value.
#
# FluidSynth renders at this sample rate directly.
#
# Values: 32000-192000 (48000*)
sample_rate = 48000

# Set audio rendering chunk size (samples).
#
# A single stereo frame of audio has two samples, and so this value is double
# the number of frames per chunk.
# The smaller the chunk size, the lower the latency, but too low a value will
# cause underruns (distortion artifacts).
#
# Latency is a function of chunk size and sample rate, for example:
# 256 samples / 2 channels / 48000Hz * 1000ms = 2.67ms of latency.
# See documentation for recommended values for various Raspberry Pi models.
#
# The minimum value varies depending on audio output device.
# For PWM, the minimum is 2, for I2S the minimum is 32.
# For HDMI, the minimum is 384, and will be rounded to the nearest multiple of
# 384.
#
# Values: 2-2048 (256*)
chunk_size = 256

# Set address (hexadecimal) of I2C DAC control interface.
#
# This will be used for the initialization sequence (see below) if enabled.
# You can find the address of your DAC by using the i2cdetect utility in Linux.
#
# Values: 00-80 (4c*)
i2c_dac_address = 4c

# Select an initialization sequence for the DAC.
#
# Some DACs require some initialization commands to be sent via I2C before they
# will produce any sound.
#
# Values: none*, pcm51xx
#
# pcm51xx: for DACs based on PCM5121 or similar (e.g. PCM5141, PCM5242)
i2c_dac_init = none

# -----------------------------------------------------------------------------
# Control options
# -----------------------------------------------------------------------------
[control]

# Set the physical control scheme.
#
# See documentation for GPIO pinouts/wiring details.
#
# Values: none*, simple_buttons, simple_encoder
#
# none:           No physical controls
# simple_buttons: Simple 4-button scheme
# simple_encoder: Simple 2-button + rotary encoder scheme
scheme = none

# Set the rotary encoder type (if used by control scheme).
#
# Different rotary encoders may complete different fractions of a Gray-code
# cycle per detent ("click").
#
# If four clicks are needed for a single movement, try "quarter".
# If two clicks are needed for a single movement, try "half".
#
# Values: quarter, half, full*
encoder_type = full

# Reverse the rotary encoder direction (if used by control scheme).
#
# Some rotary encoders may have their CLK/DAT signals swapped, resulting in
# a reversed rotation direction.
#
# Use this option to correct the direction.
#
# Values: on, off*
encoder_reversed = off

# Enable or disable the I2C MiSTer control interface.
#
# If using mt32-pi with a MiSTer FPGA system and custom hardware to interface
# with MiSTer's User Port, enable this option to allow controlling mt32-pi via
# the MiSTer's on-screen display.
#
# Values: on, off*
mister = on

# Set the timeout for switching SoundFonts (seconds).
#
# When switching SoundFonts using the physical button, there is a short delay
# before loading begins. This option allows you to set the number of seconds to
# wait before loading.
#
# Values: 0-3600 (3*)
switch_timeout = 3

# -----------------------------------------------------------------------------
# MT-32 emulator options
# -----------------------------------------------------------------------------
[mt32emu]

# Set gain factor applied to synthesizer output channels.
#
# This is independent of the master volume that can be set via MIDI SysEx or
# the volume knob.
#
# Values: 0.0-256.0 (1.0*)
gain = 1.0

# Set gain factor applied to reverb wet output channels.
#
# Values: 0.0-infinity (1.0*)
reverb_gain = 1.0

# Select quality level for the resampler.
#
# If set to none, audio output will sound wrong unless you set the sample rate
# option to 32000Hz, which is the MT-32's native sample rate.
#
# Values: none, fastest, fast, good*, best
resampler_quality = good

# Select initial MIDI channel assignment.
#
# The MT-32 uses an unusual MIDI channel assignment by default. On a real MT-32
# this is set using a button combination. Use this option to change the initial
# channel assignment on startup.
#
# Values: standard*, alternate
#
# standard:  Parts 1-8 = MIDI channels 2-9, Rhythm part = MIDI channel 10
# alternate: Parts 1-8 = MIDI channels 1-8, Rhythm part = MIDI channel 10
midi_channels = standard

# Select initial ROM set to use.
#
# If multiple ROM sets are available, this option determines which set to use
# on startup. If the ROM set specified here is unavailable, the first available
# set is used instead.
#
# Values: old*, new, cm32l
rom_set = old

# Set whether the stereo channels should be swapped or not.
#
# The MT-32 interprets values for MIDI CC#10 (panpot) differently to later
# synthesizers, which means that 0 = right and 127 = left; the opposite of what
# is stated in the most recent versions of the MIDI specification.
#
# Enable this option to swap the channels and make MT-32 mode's panning
# behavior match the behavior of SoundFont mode. Note that this can also be
# switched at runtime with a custom SysEx command.
#
# Values: on, off*
reversed_stereo = off

# -----------------------------------------------------------------------------
# SoundFont synthesizer options
# -----------------------------------------------------------------------------
[fluidsynth]

# Set the initial SoundFont to use.
#
# If multiple SoundFonts are available, this option determines which SoundFont
# to use on startup.
#
# On startup, the "soundfonts" directory is scanned for valid SoundFonts, which
# are added to a list and sorted into alphabetical order.
#
# This setting is a zero-indexed offset into that list (i.e. 0 is the first,
# 1, is the second, and so on).
#
# If the index specified is unavailable, the first available SoundFont will be
# used.
#
# Values: 0-255 (0*)
soundfont = 0

# Set the master volume gain.
#
# The default is a low value to avoid clipping when many notes are playing at
# once.
#
# The value should be a decimal value between 0.0 and 10.0. Values outside this
# range will be clamped.
#
# Values: 0.0-10.0 (0.2*)
gain = 0.2

# Set the maximum number of voices that can be played simultaneously.
#
# Depending on the complexity of your SoundFont, you may need to reduce this
# value to prevent audio buffer underruns (distortion) when playing music
# featuring lots of notes being played at once.
#
# On the other hand, you may want to try raising this value if your Pi is
# being run overclocked or has a more powerful CPU (e.g. Pi 4/CM4).
#
# N.B. larger file size of the SoundFont does not imply higher CPU usage.
# SoundFonts that use more real-time effects (modulators) are more likely to
# require a reduction in polyphony.
#
# Values: 1-65535 (200*)
polyphony = 200

# The following settings set the default parameters for FluidSynth's reverb and
# chorus effects.
#
# Each setting can be overridden on a per-SoundFont basis by adding extra
# sections, e.g. [fluidsynth.soundfont.x], where x is the zero-based index of
# the SoundFont. See the next section for an example.
#
# Full descriptions and valid value ranges for each setting can be found in the
# FluidSynth documentation: https://www.fluidsynth.org/api/fluidsettings.xml
reverb = on
reverb_damping = 0.0
reverb_level = 0.9
reverb_room_size = 0.2
reverb_width = 0.5

chorus = on
chorus_depth = 8.0
chorus_level = 2.0
chorus_voices = 3
chorus_speed = 0.3

# -----------------------------------------------------------------------------
# FluidSynth effects profile for SoundFont 0 (GeneralUser GS)
# -----------------------------------------------------------------------------
[fluidsynth.soundfont.0]

# The following settings are recommended for GeneralUser GS by its author.
reverb = on
reverb_damping = 0.19
reverb_level = 0.5
reverb_room_size = 0.7
reverb_width = 0.75

chorus = on
chorus_depth = 4.5
chorus_level = 0.5
chorus_voices = 3
chorus_speed = 0.35

# -----------------------------------------------------------------------------
# LCD/OLED display options
# -----------------------------------------------------------------------------
[lcd]

# Select LCD driver.
#
# Note that LCDs connected via I2C, you must also set the correct address for
# your device via the i2c_lcd_address option. Consult its datasheet, or see
# our documentation for tested models and their configurations.
#
# Values: none*, hd44780_4bit, hd44780_i2c, sh1106_i2c, ssd1306_i2c
#
# none:         No LCD
# hd44780_4bit: Hitachi HD44780 or compatible (e.g. WS0010, RS0010) character
#               LCD connected to GPIO pins in 4-bit mode (see documentation for
#               pinout)
# hd44780_i2c:  As above, but using an I2C "backpack"
# sh1106_i2c:   Small I2C-based OLED graphical display (usually 1.3")
# ssd1306_i2c:  Small I2C-based OLED graphical display (usually 0.96")
type = ssd1306_i2c

# Set the width of the LCD.
#
# If the display is a character display, this value is measured in characters.
# Otherwise, for a graphical display, this is measured in pixels.
#
# Note that not all dimension settings are valid; see documentation for valid
# configurations for each LCD driver.
#
# Values: 20-128 (128*)
width = 128

# Set the height of the LCD.
#
# Same characters vs. pixels considerations as for width.
#
# Values: 2-64 (32*)
height = 64

# Set address (hexadecimal) of I2C LCD.
#
# This will be used to communicate with LCDs connected via the I2C bus.
#
# Values: 00-80 (3c*)
i2c_lcd_address = 3c

# Rotate the display output (graphical LCDs only).
#
# Some graphical displays support rotation. Use this option if you need to turn
# the display around.
#
# Values: normal*, inverted
#
# normal:   No rotation
# inverted: The display output is upside down
rotation = normal

# -----------------------------------------------------------------------------
# Network options
# -----------------------------------------------------------------------------
[network]

# Select the network mode.
#
# For setting your Wi-Fi SSID and encryption key, see wpa_supplicant.conf.
# Note that if using Ethernet on a Raspberry Pi 3B/3B+, USB must be enabled.
#
# off:      Disable networking
# ethernet: Enable using the Ethernet interface
# wifi:     Enable using the the Wi-Fi interface
#
# Values: off*, ethernet, wifi
mode = off

# Enable or disable DHCP for configuring the network.
#
# If disabled, the manual settings below will be used to configure your network
# interface instead.
#
# Values: on*, off
dhcp = on

# Manual settings for configuring the network interface.
#
# These settings will be ignored if DHCP is enabled.
#
# Values: correctly-formatted IP address/subnet mask, e.g. AAA.BBB.CCC.DDD
#         (four numbers in the range 0-255 separated by periods)
ip_address = 192.168.1.100
subnet_mask = 255.255.255.0
default_gateway = 192.168.1.1
dns_server = 192.168.1.1

# Set the network hostname.
#
# Values: a valid hostname using ASCII letters 'a' to 'z', digits 0-9, and
#         hyphens (*mt32-pi)
hostname = mt32-pi

# Enable or disable the RTP-MIDI/AppleMIDI server.
#
# This allows you to send MIDI data to mt32-pi over the network using macOS'
# built-in network MIDI features, or rtpMIDI by Tobias Erichsen on Windows.
#
# Values: on*, off
rtp_midi = on

# Enable or disable the embedded FTP server.
#
# This FTP server is a very basic implementation which DOES NOT feature any kind
# of transport layer security/encryption. Therefore, you should NOT enable this
# feature on a public network or expose the Raspberry Pi to the Internet.
#
# The FTP server should be considered a convenience feature only, for performing
# updates and configuration changes without having to replace the SD card.
#
# Values: on, off*
ftp = off

# Set the FTP server username and password.
#
# Values: any ASCII string (*mt32-pi)
ftp_username = mt32-pi
ftp_password = mt32-pi
espo83
Posts: 13
Joined: Tue May 26, 2020 12:45 am
Has thanked: 6 times
Been thanked: 2 times

Re: mt32-pi lite for MiSTer

Unread post by espo83 »

The files are on the MiSTer harware git

https://github.com/MiSTer-devel/Hardwar ... 32PiHat_LT

cellarboy wrote: Mon Sep 30, 2024 11:54 am

Sorry to dig up an old thread, but how did you use the PCB files in the Github repo to produce Gerber files? The files in the repo dont seem recognized by any of the PCB manufacturers.

Thanks in advance.

espo83 wrote: Sun Mar 06, 2022 7:38 pm

I built a mt32pi_lite. I used the Gerbers from the release and put it all together and I'm not sure where to go from here. It appears in the ao86 core. the OSD works I see the bars moving. I have the setting for i2s as the output but I'm getting no sound. I am using the 5.5 Analog I/O board, and per the suggestion on the Git I tried added a bank of 10k resistors where they appear in the 5.6 board, still no sound. Just looking for any suggestions.

LTWpApA.jpeg
JdXjImr.jpeg
MAxiHrl.jpeg

Content of my config(i edit it with notepad++)

Code: Select all

#                                  ________    _______                      __
#                         __      /_____   `. /____   `.                   /__`
#     ____   ____     __/  /____  _______)  / ______)  / ____  ______      __
#   /   __ v  __  `./__   _____//_____    < /   _____. /____//   ___  `. /  /
#  /  /  /  /  /  /   /  /____  _______)  //  /______       /  /____/  //  .__
# /__/  /__/  /__/    \______//_________. /_________/      /   ______.  \____/
# /////////////////////////////////////////////////////// /  / //// /// // /
#                                                         ```
# mt32-pi.cfg: mt32-pi configuration file.
# Default options are marked with an asterisk (*).

# -----------------------------------------------------------------------------
# System options
# -----------------------------------------------------------------------------
[system]

# Enable or disable verbose startup and error output.
#
# When enabled, outputs more information to the LCD when starting up, and when
# MIDI/UART errors are detected.
#
# This also may hide the boot logo on smaller graphical displays.
#
# Values: on, off*
verbose = off

# Set the default synthesizer to be made active on startup.
#
# If the default synthesizer is unavailable (e.g. missing ROMs or SoundFonts),
# the first working synth is made active.
#
# Values: mt32*, soundfont
#
# mt32:      Use mt32emu (Munt) for Roland MT-32 emulation
# soundfont: Use FluidSynth for SoundFont synthesis
default_synth = mt32

# Enable or disable support for USB devices.
#
# Disable this to speed up boot time if you are not using any USB devices.
#
# Values: on*, off
usb = off

# Set the I2C baud rate/clock speed for all peripherals (Hz).
#
# Most peripherals will work fine at the default speed (400KHz "fast mode"),
# but larger LCD/OLED displays (e.g. 4-line I2C HD44780 and 64 pixel high
# SSD1306) won't be able to refresh at 60FPS at the default setting.
#
# Try increasing this value to 1000000 (1MHz) for a smoother LCD refresh rate.
# If your display doesn't work, try backing off the speed 100KHz at a time
# until it does.
#
# Values: 100000-1000000 (400000*)
i2c_baud_rate = 400000

# Set the timeout for power saving mode (seconds).
#
# After the specified number of seconds of silence, the CPU clock speed will be
# reduced, the audio device will be stopped, and and the LCD's backlight will
# be turned off to save energy (certain I2C displays only).
#
# Any MIDI activity will instantly bring the system out of power saving mode.
#
# If set to 0, power saving mode is disabled.
#
# Values: 0-3600 (300*)
power_save_timeout = 300

# -----------------------------------------------------------------------------
# MIDI options
# -----------------------------------------------------------------------------
[midi]

# Set the baud rate used for GPIO MIDI.
#
# For connecting to standard MIDI devices (i.e. via DIN cable), this should be
# left at the default rate of 31250.
#
# For connecting to PCs, set this to match the baud rate of the other host.
# SoftMPU's serial MIDI mode, for example, uses a baud rate of 38400.
#
# Values: 300-4000000 (31250*)
gpio_baud_rate = 31250

# Enable or disable software "MIDI thru" on the GPIO Tx pin.
#
# When enabled, all data received via the GPIO Rx pin will be re-transmitted
# verbatim on the Tx pin. This may be useful for debugging or for passing MIDI
# data through to another synth.
#
# Values: on, off*
gpio_thru = off

# Set the baud rate used for USB serial MIDI.
#
# The same considerations from the gpio_baud_rate setting above apply here.
# The default value is a PC baud rate and matches SoftMPU's serial MIDI mode.
#
# The range of valid baud rates may vary depending on the chipset of your USB
# serial device, so the range of values suggested below may actually be greater.
#
# Values: 9600-115200 (38400*)
usb_serial_baud_rate = 38400

# -----------------------------------------------------------------------------
# Audio options
# -----------------------------------------------------------------------------
[audio]

# Select audio output device.
#
# Values: pwm*, i2s
#
# pwm: Use the headphone jack
# hdmi: Use the HDMI port
# i2s: Use an I2S DAC
output_device = i2s

# Sample rate of audio output (Hz).
#
# mt32emu uses an internal sample rate of 32000Hz (just like the real hardware)
# which is then resampled to this value.
#
# FluidSynth renders at this sample rate directly.
#
# Values: 32000-192000 (48000*)
sample_rate = 48000

# Set audio rendering chunk size (samples).
#
# A single stereo frame of audio has two samples, and so this value is double
# the number of frames per chunk.
# The smaller the chunk size, the lower the latency, but too low a value will
# cause underruns (distortion artifacts).
#
# Latency is a function of chunk size and sample rate, for example:
# 256 samples / 2 channels / 48000Hz * 1000ms = 2.67ms of latency.
# See documentation for recommended values for various Raspberry Pi models.
#
# The minimum value varies depending on audio output device.
# For PWM, the minimum is 2, for I2S the minimum is 32.
# For HDMI, the minimum is 384, and will be rounded to the nearest multiple of
# 384.
#
# Values: 2-2048 (256*)
chunk_size = 256

# Set address (hexadecimal) of I2C DAC control interface.
#
# This will be used for the initialization sequence (see below) if enabled.
# You can find the address of your DAC by using the i2cdetect utility in Linux.
#
# Values: 00-80 (4c*)
i2c_dac_address = 4c

# Select an initialization sequence for the DAC.
#
# Some DACs require some initialization commands to be sent via I2C before they
# will produce any sound.
#
# Values: none*, pcm51xx
#
# pcm51xx: for DACs based on PCM5121 or similar (e.g. PCM5141, PCM5242)
i2c_dac_init = none

# -----------------------------------------------------------------------------
# Control options
# -----------------------------------------------------------------------------
[control]

# Set the physical control scheme.
#
# See documentation for GPIO pinouts/wiring details.
#
# Values: none*, simple_buttons, simple_encoder
#
# none:           No physical controls
# simple_buttons: Simple 4-button scheme
# simple_encoder: Simple 2-button + rotary encoder scheme
scheme = none

# Set the rotary encoder type (if used by control scheme).
#
# Different rotary encoders may complete different fractions of a Gray-code
# cycle per detent ("click").
#
# If four clicks are needed for a single movement, try "quarter".
# If two clicks are needed for a single movement, try "half".
#
# Values: quarter, half, full*
encoder_type = full

# Reverse the rotary encoder direction (if used by control scheme).
#
# Some rotary encoders may have their CLK/DAT signals swapped, resulting in
# a reversed rotation direction.
#
# Use this option to correct the direction.
#
# Values: on, off*
encoder_reversed = off

# Enable or disable the I2C MiSTer control interface.
#
# If using mt32-pi with a MiSTer FPGA system and custom hardware to interface
# with MiSTer's User Port, enable this option to allow controlling mt32-pi via
# the MiSTer's on-screen display.
#
# Values: on, off*
mister = on

# Set the timeout for switching SoundFonts (seconds).
#
# When switching SoundFonts using the physical button, there is a short delay
# before loading begins. This option allows you to set the number of seconds to
# wait before loading.
#
# Values: 0-3600 (3*)
switch_timeout = 3

# -----------------------------------------------------------------------------
# MT-32 emulator options
# -----------------------------------------------------------------------------
[mt32emu]

# Set gain factor applied to synthesizer output channels.
#
# This is independent of the master volume that can be set via MIDI SysEx or
# the volume knob.
#
# Values: 0.0-256.0 (1.0*)
gain = 1.0

# Set gain factor applied to reverb wet output channels.
#
# Values: 0.0-infinity (1.0*)
reverb_gain = 1.0

# Select quality level for the resampler.
#
# If set to none, audio output will sound wrong unless you set the sample rate
# option to 32000Hz, which is the MT-32's native sample rate.
#
# Values: none, fastest, fast, good*, best
resampler_quality = good

# Select initial MIDI channel assignment.
#
# The MT-32 uses an unusual MIDI channel assignment by default. On a real MT-32
# this is set using a button combination. Use this option to change the initial
# channel assignment on startup.
#
# Values: standard*, alternate
#
# standard:  Parts 1-8 = MIDI channels 2-9, Rhythm part = MIDI channel 10
# alternate: Parts 1-8 = MIDI channels 1-8, Rhythm part = MIDI channel 10
midi_channels = standard

# Select initial ROM set to use.
#
# If multiple ROM sets are available, this option determines which set to use
# on startup. If the ROM set specified here is unavailable, the first available
# set is used instead.
#
# Values: old*, new, cm32l
rom_set = old

# Set whether the stereo channels should be swapped or not.
#
# The MT-32 interprets values for MIDI CC#10 (panpot) differently to later
# synthesizers, which means that 0 = right and 127 = left; the opposite of what
# is stated in the most recent versions of the MIDI specification.
#
# Enable this option to swap the channels and make MT-32 mode's panning
# behavior match the behavior of SoundFont mode. Note that this can also be
# switched at runtime with a custom SysEx command.
#
# Values: on, off*
reversed_stereo = off

# -----------------------------------------------------------------------------
# SoundFont synthesizer options
# -----------------------------------------------------------------------------
[fluidsynth]

# Set the initial SoundFont to use.
#
# If multiple SoundFonts are available, this option determines which SoundFont
# to use on startup.
#
# On startup, the "soundfonts" directory is scanned for valid SoundFonts, which
# are added to a list and sorted into alphabetical order.
#
# This setting is a zero-indexed offset into that list (i.e. 0 is the first,
# 1, is the second, and so on).
#
# If the index specified is unavailable, the first available SoundFont will be
# used.
#
# Values: 0-255 (0*)
soundfont = 0

# Set the master volume gain.
#
# The default is a low value to avoid clipping when many notes are playing at
# once.
#
# The value should be a decimal value between 0.0 and 10.0. Values outside this
# range will be clamped.
#
# Values: 0.0-10.0 (0.2*)
gain = 0.2

# Set the maximum number of voices that can be played simultaneously.
#
# Depending on the complexity of your SoundFont, you may need to reduce this
# value to prevent audio buffer underruns (distortion) when playing music
# featuring lots of notes being played at once.
#
# On the other hand, you may want to try raising this value if your Pi is
# being run overclocked or has a more powerful CPU (e.g. Pi 4/CM4).
#
# N.B. larger file size of the SoundFont does not imply higher CPU usage.
# SoundFonts that use more real-time effects (modulators) are more likely to
# require a reduction in polyphony.
#
# Values: 1-65535 (200*)
polyphony = 200

# The following settings set the default parameters for FluidSynth's reverb and
# chorus effects.
#
# Each setting can be overridden on a per-SoundFont basis by adding extra
# sections, e.g. [fluidsynth.soundfont.x], where x is the zero-based index of
# the SoundFont. See the next section for an example.
#
# Full descriptions and valid value ranges for each setting can be found in the
# FluidSynth documentation: https://www.fluidsynth.org/api/fluidsettings.xml
reverb = on
reverb_damping = 0.0
reverb_level = 0.9
reverb_room_size = 0.2
reverb_width = 0.5

chorus = on
chorus_depth = 8.0
chorus_level = 2.0
chorus_voices = 3
chorus_speed = 0.3

# -----------------------------------------------------------------------------
# FluidSynth effects profile for SoundFont 0 (GeneralUser GS)
# -----------------------------------------------------------------------------
[fluidsynth.soundfont.0]

# The following settings are recommended for GeneralUser GS by its author.
reverb = on
reverb_damping = 0.19
reverb_level = 0.5
reverb_room_size = 0.7
reverb_width = 0.75

chorus = on
chorus_depth = 4.5
chorus_level = 0.5
chorus_voices = 3
chorus_speed = 0.35

# -----------------------------------------------------------------------------
# LCD/OLED display options
# -----------------------------------------------------------------------------
[lcd]

# Select LCD driver.
#
# Note that LCDs connected via I2C, you must also set the correct address for
# your device via the i2c_lcd_address option. Consult its datasheet, or see
# our documentation for tested models and their configurations.
#
# Values: none*, hd44780_4bit, hd44780_i2c, sh1106_i2c, ssd1306_i2c
#
# none:         No LCD
# hd44780_4bit: Hitachi HD44780 or compatible (e.g. WS0010, RS0010) character
#               LCD connected to GPIO pins in 4-bit mode (see documentation for
#               pinout)
# hd44780_i2c:  As above, but using an I2C "backpack"
# sh1106_i2c:   Small I2C-based OLED graphical display (usually 1.3")
# ssd1306_i2c:  Small I2C-based OLED graphical display (usually 0.96")
type = ssd1306_i2c

# Set the width of the LCD.
#
# If the display is a character display, this value is measured in characters.
# Otherwise, for a graphical display, this is measured in pixels.
#
# Note that not all dimension settings are valid; see documentation for valid
# configurations for each LCD driver.
#
# Values: 20-128 (128*)
width = 128

# Set the height of the LCD.
#
# Same characters vs. pixels considerations as for width.
#
# Values: 2-64 (32*)
height = 64

# Set address (hexadecimal) of I2C LCD.
#
# This will be used to communicate with LCDs connected via the I2C bus.
#
# Values: 00-80 (3c*)
i2c_lcd_address = 3c

# Rotate the display output (graphical LCDs only).
#
# Some graphical displays support rotation. Use this option if you need to turn
# the display around.
#
# Values: normal*, inverted
#
# normal:   No rotation
# inverted: The display output is upside down
rotation = normal

# -----------------------------------------------------------------------------
# Network options
# -----------------------------------------------------------------------------
[network]

# Select the network mode.
#
# For setting your Wi-Fi SSID and encryption key, see wpa_supplicant.conf.
# Note that if using Ethernet on a Raspberry Pi 3B/3B+, USB must be enabled.
#
# off:      Disable networking
# ethernet: Enable using the Ethernet interface
# wifi:     Enable using the the Wi-Fi interface
#
# Values: off*, ethernet, wifi
mode = off

# Enable or disable DHCP for configuring the network.
#
# If disabled, the manual settings below will be used to configure your network
# interface instead.
#
# Values: on*, off
dhcp = on

# Manual settings for configuring the network interface.
#
# These settings will be ignored if DHCP is enabled.
#
# Values: correctly-formatted IP address/subnet mask, e.g. AAA.BBB.CCC.DDD
#         (four numbers in the range 0-255 separated by periods)
ip_address = 192.168.1.100
subnet_mask = 255.255.255.0
default_gateway = 192.168.1.1
dns_server = 192.168.1.1

# Set the network hostname.
#
# Values: a valid hostname using ASCII letters 'a' to 'z', digits 0-9, and
#         hyphens (*mt32-pi)
hostname = mt32-pi

# Enable or disable the RTP-MIDI/AppleMIDI server.
#
# This allows you to send MIDI data to mt32-pi over the network using macOS'
# built-in network MIDI features, or rtpMIDI by Tobias Erichsen on Windows.
#
# Values: on*, off
rtp_midi = on

# Enable or disable the embedded FTP server.
#
# This FTP server is a very basic implementation which DOES NOT feature any kind
# of transport layer security/encryption. Therefore, you should NOT enable this
# feature on a public network or expose the Raspberry Pi to the Internet.
#
# The FTP server should be considered a convenience feature only, for performing
# updates and configuration changes without having to replace the SD card.
#
# Values: on, off*
ftp = off

# Set the FTP server username and password.
#
# Values: any ASCII string (*mt32-pi)
ftp_username = mt32-pi
ftp_password = mt32-pi
Post Reply