Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make 7_AudioTestApp as main #7

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8ec959b
This branch is an example for taking the FFT of input audio samples a…
eclarson Aug 28, 2020
1649931
cleaned up spacing in file
eclarson Aug 28, 2020
9039ca7
Updated code from the flipped module.
eclarson Aug 28, 2020
9f39b68
changing to use latest license
eclarson Aug 31, 2021
8b5be82
new remote branch and output
eclarson Sep 13, 2021
d2a597e
fixing novocaine issue with sampling rate
eclarson Sep 22, 2021
054ee22
commit of better graphing library
eclarson Nov 4, 2021
3d9ec5a
adding graphing support for grids and examples to set background color
eclarson Nov 5, 2021
7eda5aa
added better error checking
eclarson Sep 14, 2022
40ddafa
Added example for placing the metal graph inside a custom view.
eclarson Sep 15, 2023
b874beb
added a "zoomed fit" graph for some extra clarity
eclarson Sep 27, 2023
a25187a
committing other comments
eclarson Sep 27, 2023
d9adbc6
added public sampling rate to audio model
eclarson Sep 27, 2023
880b2f4
Committing some additions to the FFT graphing plot
eclarson Sep 27, 2023
b4ac961
added a comment and storyboard update
eclarson Sep 27, 2023
4dd7d2f
New branch for testing
eclarson Sep 29, 2023
7ce0b97
Added some additional functionality and explanation text.
eclarson Sep 29, 2023
fcbe0b0
app store updates
eclarson Sep 29, 2023
e793d51
I THINK that I fixed a memory leak and a race condition on the MTL co…
eclarson Oct 3, 2023
50dec22
Still trying to track down this leak. Instruments cannot detect... bu…
eclarson Oct 3, 2023
de910e9
fixing notification observer for metal graph
eclarson Oct 3, 2023
2ab682b
add shaders???
eclarson Oct 3, 2023
cf862c7
added F functionality
eclarson Sep 23, 2024
cd7b0cf
changes for module A and start for B
naim1115 Oct 11, 2024
c8fc367
add oooh vs aaah
ephraim888sun Oct 11, 2024
bc0b912
add storyboard
ephraim888sun Oct 11, 2024
4a7506d
changes
naim1115 Oct 11, 2024
24988a0
satisfaction song playing fix
naim1115 Oct 11, 2024
c5308bd
commit
naim1115 Oct 11, 2024
15f5e73
commit
naim1115 Oct 11, 2024
0e805d9
final push?
naim1115 Oct 11, 2024
1c1aaef
push
naim1115 Oct 12, 2024
f84974e
final commit
naim1115 Oct 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add shaders???
  • Loading branch information
eclarson committed Oct 3, 2023
commit 2ab682ba43f0af500eb02d8f5a6474dad50a061a
8 changes: 4 additions & 4 deletions AudioLabSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
B60B8A032ACC977B0083315D /* Shaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = B60B8A022ACC977B0083315D /* Shaders.metal */; };
B60B8A092ACCAFFD0083315D /* Shaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = B60B8A082ACCAFFD0083315D /* Shaders.metal */; };
B65B5A5A24F4409F00E74E73 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65B5A5924F4409F00E74E73 /* AppDelegate.swift */; };
B65B5A5C24F4409F00E74E73 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65B5A5B24F4409F00E74E73 /* SceneDelegate.swift */; };
B65B5A5E24F4409F00E74E73 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65B5A5D24F4409F00E74E73 /* ViewController.swift */; };
Expand All @@ -24,7 +24,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
B60B8A022ACC977B0083315D /* Shaders.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = Shaders.metal; sourceTree = "<group>"; };
B60B8A082ACCAFFD0083315D /* Shaders.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = Shaders.metal; sourceTree = "<group>"; };
B65B5A5624F4409F00E74E73 /* AudioLabSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AudioLabSwift.app; sourceTree = BUILT_PRODUCTS_DIR; };
B65B5A5924F4409F00E74E73 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
B65B5A5B24F4409F00E74E73 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -104,7 +104,7 @@
B65B5A7C24F458D700E74E73 /* FFTHelper.h */,
B65B5A7B24F458D700E74E73 /* FFTHelper.m */,
B65B5A8024F4AAB800E74E73 /* MetalGraph.swift */,
B60B8A022ACC977B0083315D /* Shaders.metal */,
B60B8A082ACCAFFD0083315D /* Shaders.metal */,
);
path = Utilities;
sourceTree = "<group>";
Expand Down Expand Up @@ -186,7 +186,7 @@
B65B5A7824F444CE00E74E73 /* CircularBuffer.m in Sources */,
B65B5A7324F443A400E74E73 /* AudioFileReader.m in Sources */,
B65B5A7024F440D600E74E73 /* Novocaine.m in Sources */,
B60B8A032ACC977B0083315D /* Shaders.metal in Sources */,
B60B8A092ACCAFFD0083315D /* Shaders.metal in Sources */,
B65B5A8124F4AAB800E74E73 /* MetalGraph.swift in Sources */,
B65B5A5E24F4409F00E74E73 /* ViewController.swift in Sources */,
B65B5A5A24F4409F00E74E73 /* AppDelegate.swift in Sources */,
Expand Down
38 changes: 38 additions & 0 deletions AudioLabSwift/Utilities/Shaders.metal
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// Shaders.metal
// AudioLabSwift
//
// Created by Eric Larson
// Copyright © 2020 Eric Larson. All rights reserved.
//
// started with shader code from the following very helpful repository:
// https://github.com/RedQueenCoder/Metal-Learning-Projects/blob/master/2DDrawing/Star/Star/GameViewController.swift

#include <metal_stdlib>
using namespace metal;




struct VertexInOut
{
float4 position [[position]];
float4 color;
};

vertex VertexInOut passThroughVertex(uint vid [[ vertex_id ]],
constant packed_float4* position [[ buffer(0) ]],
constant packed_float4* color [[ buffer(1) ]])
{
VertexInOut outVertex;

outVertex.position = position[vid];
outVertex.color = color[vid];

return outVertex;
};

fragment half4 passThroughFragment(VertexInOut inFrag [[stage_in]])
{
return half4(inFrag.color);
};