Skip to content

Commit

Permalink
Interface refactor. Added PedalboardInterface.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeoliphant committed Jul 8, 2024
1 parent 2807de5 commit 9baa456
Show file tree
Hide file tree
Showing 25 changed files with 1,022 additions and 639 deletions.
2 changes: 1 addition & 1 deletion Dependencies/UILayout
2 changes: 1 addition & 1 deletion Dependencies/stompbox
Binary file added SrcTextures/UserInterface/StompOutline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions StompboxAndroid/Activity1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace StompboxAndroid
namespace Stompbox
{
[Activity(
Label = "@string/app_name",
Expand All @@ -22,6 +22,8 @@ namespace StompboxAndroid

public class Activity1 : AndroidGameActivity
{
public static Activity1 Instance { get; private set; }

View view;
StompboxClient guitarClient;
MonoGameHost GameHost;
Expand All @@ -30,13 +32,15 @@ protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);

StompboxGame.DAWMode = false;
Instance = this;

guitarClient = new StompboxClient(inClientMode: true, StompboxGame.DAWMode);
//StompboxGame.DAWMode = false;

StompboxGame game = new StompboxGame();
guitarClient = new StompboxClient(inClientMode: true);

game.Scale = 1.0f;
StompboxGame.InterfaceType = EStompboxInterfaceType.Mobile;

StompboxGame game = new StompboxGame();

//game.SetScreenScale(scale, resizeScreen: true);

Expand Down
4 changes: 2 additions & 2 deletions StompboxAndroid/StompboxAndroid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants);STOMPBOXREMOTE</DefineConstants>
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidKeyStore>False</AndroidKeyStore>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>$(DefineConstants);STOMPBOXREMOTE</DefineConstants>
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidKeyStore>False</AndroidKeyStore>
<AndroidPackageFormat>apk</AndroidPackageFormat>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions StompboxHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class Program
[STAThread]
static void Main(string[] args)
{
StompboxGame.DAWMode = false;

StompboxPlugin plugin = new StompboxPlugin();

WindowsFormsHost<StompboxPlugin> host = new WindowsFormsHost<StompboxPlugin>(plugin);
Expand Down
4 changes: 2 additions & 2 deletions StompboxHost/StompboxHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AudioPlugSharp" Version="0.6.0" />
<PackageReference Include="AudioPlugSharpHost" Version="0.6.0" />
<PackageReference Include="AudioPlugSharp" Version="0.6.1" />
<PackageReference Include="AudioPlugSharpHost" Version="0.6.1" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
</ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions StompboxImageProcessor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public void Render()

Add("MoreButton");

Add("StompOutline");

Add("Play");
Add("Stop");
Add("Restart");
Expand Down
26 changes: 13 additions & 13 deletions StompboxPlugin/StompboxPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public StompboxPlugin()

HasUserInterface = true;

Logger.ImmediateMode = true;
//Logger.ImmediateMode = true;

//Logger.ImmediateMode = true;
//Logger.WriteToStdErr = true;
Expand All @@ -55,16 +55,16 @@ public override void Initialize()
InputPorts = new AudioIOPort[] { monoInput = new AudioIOPort("Mono Input", EAudioChannelConfiguration.Mono) };
OutputPorts = new AudioIOPort[] { monoOutput = new AudioIOPort("Mono Output", EAudioChannelConfiguration.Mono) };

if (StompboxGame.DAWMode)
{
//if (StompboxGame.DAWMode)
//{
EditorWidth = 1000;
EditorHeight = 540;
}
else
{
EditorWidth = 378;
EditorHeight = 672;
}
// }
//else
//{
// EditorWidth = 378;
// EditorHeight = 672;
// }


//SampleFormatsSupported = EAudioBitsPerSample.Bits64;
Expand All @@ -79,7 +79,7 @@ public override void Initialize()

StompboxClient.DebugAction = Debug;

StompboxClient = new StompboxClient(inClientMode: false, StompboxGame.DAWMode);
StompboxClient = new StompboxClient(inClientMode: false);

StompboxClient.MidiCallback = SendMidiCommand;
}
Expand Down Expand Up @@ -145,10 +145,10 @@ void RunGame()

StompboxGame game = new StompboxGame();

if (StompboxGame.DAWMode)
//if (StompboxGame.DAWMode)
game.Scale = 0.35f;
else
game.Scale = (float)EditorWidth / 1080;
//else
// game.Scale = (float)EditorWidth / 1080;

using (GameHost = new MonoGameHost(screenWidth, screenHeight, fullscreen: false))
{
Expand Down
2 changes: 1 addition & 1 deletion StompboxPlugin/StompboxPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ProjectReference Include="..\UnmanagedBridge\UnmanagedBridge.vcxproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AudioPlugSharp" Version="0.6.0" />
<PackageReference Include="AudioPlugSharp" Version="0.6.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.303" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
Expand Down
21 changes: 13 additions & 8 deletions StompboxRemote/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@
using Stompbox;
using UILayout;

StompboxGame.DAWMode = true;
StompboxClient client = new StompboxClient(inClientMode: true);

StompboxClient client = new StompboxClient(inClientMode: true, StompboxGame.DAWMode);

//client.MidiCallback = SendMidiCommand;
StompboxGame.InterfaceType = EStompboxInterfaceType.Pedalboard;

StompboxGame game = new StompboxGame();

//game.SetScreenScale(scale, resizeScreen: true);

//int width = 540;
//int height = 960;
int width = 1024;
int height = 640;

if (StompboxGame.InterfaceType == EStompboxInterfaceType.Mobile)
{
width = 540;
height = 960;
}
else if (StompboxGame.InterfaceType == EStompboxInterfaceType.Pedalboard)
{
width = 320;
height = 240;
}

using (MonoGameHost GameHost = new MonoGameHost(width, height, fullscreen: false))
{
GameHost.IsMouseVisible = true;
Expand Down
4 changes: 1 addition & 3 deletions StompboxRemoteGL/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
using Stompbox;
using UILayout;

StompboxGame.DAWMode = true;

StompboxClient client = new StompboxClient(inClientMode: true, StompboxGame.DAWMode);
StompboxClient client = new StompboxClient(inClientMode: true);

//client.MidiCallback = SendMidiCommand;

Expand Down
4 changes: 2 additions & 2 deletions StompboxShared/AudioPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public PluginParameter ShallowCopy()

public interface IAudioPlugin
{
IStompboxClient StompboxClient { get; set; }
StompboxClient StompboxClient { get; set; }
String Name { get; set; }
String ID { get; }
bool Enabled { get; set; }
Expand All @@ -111,7 +111,7 @@ public interface IAudioPlugin

public class AudioPluginBase : IAudioPlugin
{
public IStompboxClient StompboxClient { get; set; }
public StompboxClient StompboxClient { get; set; }
public String Name { get; set; }
public String ID { get; set; }
public virtual bool Enabled
Expand Down
Loading

0 comments on commit 9baa456

Please sign in to comment.