Is there any audio ads for iPhone audio apps? - iphone

my app is like podcast for web articles. https://apps.apple.com/app/id1273954643
I plan to make a free version and am curious if there is audio ads for iPhone apps.
Since most users of my app don't see the screen, banner ads doesn't fit well.
I want to insert audio ads like spotify.
I checked http://www.medialets.com/ and http://www.greystripe.com/, but their show cases
are quite vague. I sent emails to them, but no reply yet.
Any help will be greatly appreciated.
Thanks!

Hmmm... this seems like an awesome business opportunity that hasn't been properly executed yet.
I have also seen mentions of audio ads being served up into client iPhone apps by TargetSpot.

I really like your idea.And after searching for a while i came across this helpful tutorial-
Though its kind of commercial but hope it will help you.
http://advertising.about.com/od/smallbusinesscampaigns/a/podcastweb.htm

if you're willing to use an API. You could use something like this
https://docs.api.audio/recipes/programmatic-audio-ads
#Check that you are using python 3.8 or further
#pip install -U aflr
import aflr
aflr.api_key = "APIKEY"
audience = [
{"number": "33", "location": "Buckingham"},
{"number": "22", "location": "Sunshine"},
]
text = """
<<soundSegment::effect1>>
<<sectionName::hello>>
If you have any plans for today, cancel them!
<<soundSegment::intro>>
<<sectionName::hello2>>
This really is the final call for {{location}} Hyundai's massive clear out sale! Only until midnight tonight, so come on down!
<<soundSegment::main>>
<<sectionName::main>>
We're clearing out all remaining 2020 Hyundais at Ottawa's top volume Hyundai dealers. These are the last days for clear out pricing and amazing clear out incentives. Zero percent financing for up to 84 months, and up to 7700 in cash price adjustments on all 2020 Hyundais at Hyundai on {{location}}. Pick one of the {{number}} Santa Fays in stock, a family-sized SUV with all-wheel drive and back-up cameras from just $85 weekly, zero down!
It's the easiest time to get into a new Hyundai, but these deals won't be around for long, ONLY until midnight TONIGHT!
<<soundSegment::outro>>
<<sectionName::outro>>
Get into a new Hyundai today. At {{location}} Hyundai, better cars for passionate car drivers. <break time="1s"/>
"""
script = aflr.Script().create(scriptText=text, scriptName="helloworld", moduleName="hello", projectName="hello")
print(script)
for item in audience:
r = aflr.Speech().create(
scriptId=script.get("scriptId"),
voice="en-US-GuyNeural",
speed=120,
silence_padding=0,
audience=[item],
)
print(r)
template = "hotwheels"
print(template)
for item in audience:
r = aflr.Mastering().create(
scriptId=script.get("scriptId"), soundTemplate=template, audience=[item]
)
print(r)
url = aflr.Mastering().download(
scriptId=script.get("scriptId"),
parameters=item,
destination=".",
)
print(f"✨ Mastered file for template {template} ✨")
print(url)
```
That way you could serve this, this is in python. You could also do it in Swift (but there's no sdk for this atm you'd need to write it yourself).
Disclamier - I work for www.api.audio

Related

Bing Truck Routing API - travelDistance units

We're dipping our toes into the Truck Routing API, and have a question on the units used in the travelDistance element of the regionTravelSummary.
Example GET request
https://dev.virtualearth.net/REST/v1/Routes/Truck?wayPoint.1=85710&waypoint.2=80634&routeAttributes=regionTravelSummary&distanceUnit=mi&vehicleTrailers=1&key=
What's interesting is in the routeLegs.RegionTravelSummary, the travelDistance is not in Miles (or kilometers, or anything I can figure out). Here's a snippet of the JSON:
"regionTravelSummary":[
{
"name":"United States",
"subregions":[
{
"name":"Arizona",
"travelDistance":818486183.9,
"travelDuration":22151,
"travelDurationTraffic":22151
},
{
"name":"New Mexico",
"travelDistance":1019336643.92,
"travelDuration":19460,
"travelDurationTraffic":19460
},
{
"name":"Colorado",
"tollDistance":11959005.54,
"travelDistance":702204931.54,
"travelDuration":14428,
"travelDurationTraffic":14428
}
],
"tollDistance":11959005.54,
"travelDistance":2540027759.36,
"travelDuration":56038,
"travelDurationTraffic":56038
}
]
What am I looking at here? The travelDistance in the primary resources array is correctly showing 980 miles:
"trafficCongestion":"None",
"trafficDataUsed":"None",
"travelDistance":980.715076,
"travelDuration":56038,
"travelDurationTraffic":57776,
"travelMode":"Truck"
For this route, there should be 130 miles in Arizona, and 550 miles in New Mexico, and 300 for Colorado (+/- 40ish miles here or there depending on engine and settings).
Haven't seen that before. I've sent this thread to the engineering team to investigate. I also can't figure out for the life of me what those units are. Will update this post with any updates I hear.
Update
That team recently noticed this issue as well and are investigating a fix. They plan to have this fixed in production by end of next week.
Update 2
The Bing Maps team also asks that you direct technical support related questions to the Microsoft Q&A forums. The StackOverflow community often closes this type of questions as it's not meant to be a support channel. Here is the main technical forum for Microsoft enterprise mapping products: https://learn.microsoft.com/en-us/answers/topics/azure-maps.html

music21: get the voice/program/instrument of midi voice from a flat score?

I have a simple script that uses music21 to process the notes in a midi file:
import music21
score = music21.converter.parse('www.vgmusic.com/music/console/nintendo/nes/zanac1a.mid')
for i in score.flat.notes:
print(i.offset, i.quarterLength, i.pitch.midi)
Is there a way to also obtain a note's voicing / midi program using a flat score? Any pointers would be appreciated!
MIDI channels and programs are stored on Instrument instances, so use getContextByClass(instrument.Instrument) to find the closest Instrument in the stream, and then access its .midiProgram.
Be careful:
.midiChannel and .midiProgram are 0-indexed, so MIDI channel 10 will be 9 in music21, etc., (we're discussing changing this behavior in the next release)
Some information might be missing if you're not running the bleeding edge version (we merged a patch yesterday on this topic), so I advise pulling from git: pip install git+https://github.com/cuthbertLab/music21
.flat is going to kill you, though, if the file is multitrack. If you follow my advice you'll just get the last instrument on every track. 90% of the time people doing .flat actually want .recurse().

Pulling data from a GKLeaderboard

Okay, so I have spent a large amount of time searching the internet for help on this to no success, so I would like some help.
I am making a game with SpriteKit, and I have decided to implement my own leaderboard style, rather than the clunky Game Center default. I have managed to log the user into GC, but cannot find the correct (and working) Swift 3 code for pulling information from the leaderboard. I want to pull the top 10 score, along with the current user score (if they aren't already in the top 10). The information I would like from them is position, username and score.
I know this is a fairly simple concept, but every tutorial online either uses the default GC view, or is extremely old/outdated code which no longer works. I just need to know how to pull this information from the leaderboard, then I can process it all myself!
Thank you for any help in advance!
It seems like Apple doesn't have proper example code in Swift, but here's a Swift version loosely based on their Objective-C example:
let leaderboard = GKLeaderboard()
leaderboard.playerScope = .global
leaderboard.timeScope = .allTime
leaderboard.identifier = "YourIdentifier"
leaderboard.loadScores { scores, error in
guard let scores = scores else { return }
for score in scores {
print(score.value)
}
}
Note, this is just a translation from Apple's Objective-C code, and I haven't tested it with real data.

Controlling light using midi inputs

I currently am using Max/MSP to create an interactive system between lights and sound.
I am using Philips hue lighting which I have hooked up to Max/MSP and now I am wanting to trigger an increase in brightness/saturation on the input of a note from a Midi instrument. Does anyone have any ideas how this might be accomplished?
I have built this.
I used the shell object. And then feed an array of parameters into it via a javascipt file with the HUE API. There is a lag time of 1/6 of a second between commands.
Javascript file:
inlets=1;
outlets=1;
var bridge="192.168.0.100";
var hash="newdeveloper";
var bulb= 1;
var brt= 200;
var satn= 250;
var hcolor= 10000;
var bulb=1;
function list(bulb,hcolor,brt,satn,tran) {
execute('PUT','http://'+bridge+'/api/'+hash+'/lights/'+bulb+'/state', '"{\\\"on\\\":true,\\\"hue\\\":'+hcolor+', \\\"bri\\\":'+brt+',\\\"sat\\\":'+satn+',\\\"transitiontime\\\":'+tran+'}"');
}
function execute($method,$url,$message){
outlet(0,"curl --request",$method,"--data",$message,$url);
}
To control Philips Hue you need to issue calls to a restful http based api, like so: http://www.developers.meethue.com/documentation/core-concepts, using the [jweb] or [maxweb] objects: https://cycling74.com/forums/topic/making-rest-call-from-max-6-and-saving-the-return/
Generally however, to control lights you use DMX, the standard protocol for professional lighting control. Here is a somewhat lengthy post on the topic: https://cycling74.com/forums/topic/controlling-video-and-lighting-with-max/, scroll down to my post from APRIL 11, 2014 | 3:42 AM.
To change the bri/sat of your lights is explained in the following link (Registration/Login required)
http://www.developers.meethue.com/documentation/lights-api#16_set_light_state
You will need to know the IP Address of your hue hue bridge which is explained here: http://www.developers.meethue.com/documentation/getting-started and a valid username.
Also bear in mind the performance limitations. As a general rule you can send up to 10 lightstate commands per second. I would recommend having a 100ms gap between each one, to prevent flooding the bridge (and losing commands).
Are you interested in finding out details of who to map this data from a MIDI input to the phillips HUE lights within max? or are you already familiar with Max.
Using Tommy b's javascript (which you could put into a js object), You could for example scale the MIDI messages you want to use using midiin and borax objects and map them to the outputs you want using the scale object. Karlheinz Essl's RTC library is a good place to start with algorithmic composition if you want to transform the data at all http://www.essl.at/software.html
+1 for DMX light control via Max. There are lots of good max-to-dmx tutorials and USB-DMX hardware is getting pretty cheap. However, as someone who previously believed in dragging a bunch of computer equipment on stage just to control a light or two with an instrument, I'd recommend researching and purchasing a simple one channel "color organ" circuit kit (e.g., Velleman MK 110). Controlling a 120/240V light bulb via audio is easier than you might think; a computer for this type of application is usually overkill. Keep it simple and good luck!

Is it possible to set up a clock trigger in Google Apps to send spreadsheet hourly?

I have a spreadsheet that logs incoming answered and missed calls in Google Drive.
It is currently set to send an email every hour between 10am and 7pm.
Ideally I would like it to not send the email during the weekend.
Setting up each hour Monday to Friday uses too many triggers.
Is there a way to construct a trigger that will send an email every hour (10am to 7pm) only Monday to Friday?
I've read the documentation at Google and a few (unrelated as it turns out) examples on here and I am stumped!
I tried putting a load of trigger conditions together:
function autoSendHourly() {
ScriptApp.newTrigger("hourlyUpdate()")
.timeBased()
.onWeekDay(ScriptApp.WeekDay.MONDAY)
.onWeekDay(ScriptApp.WeekDay.TUESDAY)
.onWeekDay(ScriptApp.WeekDay.WEDNESDAY)
.onWeekDay(ScriptApp.WeekDay.THURSDAY)
.onWeekDay(ScriptApp.WeekDay.FRIDAY)
.atHour(10)
.atHour(11)
.atHour(12)
.atHour(13)
.atHour(14)
.atHour(15)
.atHour(16)
.atHour(17)
.atHour(18)
.atHour(19)
.create();
}
I wasn't entirely surprised that it didn't work, but I was mildly surprised that it threw up no errors.
Any help (including "you're mad it can't be done") would be greatly appreciated.
The simplest thing to do is use the create trigger like you did but for every hour every day and then in you handler function add a small piece of code that will return if day and time don't meet specific conditions like explained in this (old) post.
the code may look like something like this :
function officeHours(){
var nowH=new Date().getHours();
var nowD=new Date().getDay();
Logger.log('day : '+nowD+' Hours : '+nowH)
if(nowH>17||nowH<8||nowD==6||nowD==0){return}
Browser.msgBox('time to work !');//normally your real function should begin here...
}
I haven't messed around with java in awhile but this article might help.
Android: how to get the current day of the week (Monday, etc...) in the user's language?
If it was me, I would get the day of the week and check it in a switch. Then if it matches a week day call a function to check the time between 10am and 7pm.
Best of luck.